MATLAB News & Notes - December 2004
MATLAB & Simulink in the World
Developing and Testing Embedded Systems
by Jeff Healey and Jim Tung
Companies use MathWorks products throughout embedded system development—from system design to implementation to test and verification. Applying Model-Based Design with MATLAB and Simulink enables engineers to simulate and generate code for production embedded systems, rapid prototyping systems, and test systems. Simulink also serves as a virtual testbed to verify software and hardware implementations through simulation with plant or environment models. MATLAB enables embedded system analysis and optimization by providing tight integration with development tools, calibration systems, and test instrumentation.
Minimizing Energy Consumption of Hydrogen Generators
Chess Embedded Technology in the
Netherlands developed an embedded controller
for a hydrogen generator that acts
as a combined power and heat generation
system for use in the home.
Commissioned by HydrogenSource, a
joint partnership of UTC Fuel Cells and
Shell, Chess used MathWorks tools to
model, simulate, and generate software for
the controller. Using MATLAB, Chess
developed a GUI-based application that enables the HydrogenSource
scientists to generate and modify embedded software for their
dedicated hardware modules without writing C code manually.
The application uses Simulink to describe the control algorithms,
Stateflow to define the startup and shutdown behavior, and
Real-Time Workshop Embedded Coder to automatically generate
code. The generator is expected to reduce energy consumption by
25%, significantly lowering CO2 emissions.
Developing an FPGA-based Video Encryption System
Nallatech in the United Kingdom used MathWorks and Xilinx tools
to develop a reconfigurable video encryption system for the UK
Ministry of Defence, enabling their engineers to change algorithms
on the FPGA without needing to learn VHDL. Nallatech also
demonstrated how to reverify the
entire system more quickly by
performing validation at a subsystem
level. Engineers developed,
tested, and debugged the encryption
algorithms in Simulink, then
used Xilinx System Generator to automatically
generate VHDL, which was implemented
on a Xilinx Virtex-II FPGA running on
Nallatech’s BenAdda module. Other parts of the
Simulink model served as a test harness. The development took
one-third of the time it would have taken to write the VHDL
manually.
Identifying Noise and Other Interference on Communication Links
YarCom implemented a
stimulus-response test system
to identify and locate
noise and other interference
on communication links in
remote locations. YarCom
used the Data Acquisition
and Instrument Control
toolboxes to acquire data
in the IF, AF, and RF
spectrum ranges using remotely placed
instruments, with the stimulus controlled by MATLAB serial port
commands. Using the Communications, Statistics
, and Signal
Processing toolboxes, engineers analyzed the collected data and
identified interference. The Mapping Toolbox helped them analyze
the results in a geographic context and locate sources of interference.
As a result, Yarcom can identify and resolve noise and interference
problems in hours.
Teaching Digital Signal Processing to Undergraduates
Clarkson University introduces freshman engineering students to
MATLAB and Simulink as core tools for their undergraduate
studies. This early exposure enables instructors of subsequent
courses to focus on course topics and theories, combined with
hands-on examples and exercises. For example, in the senior-level
digital signal processing
course, students learn topics such as
Fourier series, digital filters, and spectral
estimation. They also learn to build real-world
DSP applications by designing algorithms
in Simulink and using Real-Time
Workshop to generate embedded code for
TI C6000 DSP chips. This combination
of theory and hands-on experience gives
students the background and skills they
need to tackle real-world engineering
problems.
Designing Control Schemes for a Next-Generation Washing Machine
Whirlpool Corporation is replacing a paper-driven
design process with Model-Based
Design to develop advanced control algorithms
for the Whirlpool® Duet HT® washing
machine. Using this approach, Whirlpool
models the behavior of a washing machine
with MATLAB and Simulink, then designs
control schemes for different wash sequences
and set combinations. Hardware interconnections
are specified using target-specific I/O blocks in the model.
Once the control schemes are tested through simulation, the engineers
use Real-Time Workshop to generate the control code, which they
download to an xPC TargetBox connected to the washing machine’s
motor, to verify the controller performance with the production
equipment.
Creating Automotive Embedded Software
Using a General-Purpose Prototyping ECU
Jaguar uses MathWorks products and add2’s Microgen electronic control
unit (ECU) to develop embedded software for automotive transmission,
driver entertainment, and body systems. The Microgen ECU,
based on the Motorola® MPC555 microcontroller, provides a flexible
prototyping target that is architecturally similar to the production ECU.
In a typical project, engineers design their algorithms in Simulink and
Stateflow, modeling the I/O using Simulink blocks from the Embedded
Target for Motorola MPC555 and from
add2. After validating their
algorithms in simulation, they use
Real-Time Workshop to automatically
generate C code. Test engineers then
download the code over CAN bus into
RAM or flash memory on the target
ECU. By testing the new features on real hardware, Jaguar improves the
quality of specifications that they provide to their suppliers.
Delivering a Compliance Test System Using MATLAB
on an Oscilloscope
Tektronix uses MathWorks products to develop and deploy compliance
and analysis test solutions for PCI-Express™, InfiniBand®, and other
high-speed serial I/O technologies in
the computing and communications
industries. Tektronix RT-Eye™ software
uses MATLAB as its analysis and
plotting engine for waveform eye diagrams,
histograms, trend plots, and jitter
bathtub curves. The measurement
and analysis features in RT-Eye, which runs on the Tektronix
TDS6000B and TDS/CSA7000B high-performance oscilloscopes,
enable hardware designers and validation engineers to reduce time to
market of their next-generation system designs.
Controlling Unmanned Aerial Vehicles
BAE SYSTEMS Platform Solutions integrated MathWorks products with their CsLEOS™ real-time operating system on several manned and unmanned aircraft programs, including the integrated vehicle management system on the Northrop Grumman Pegasus X-47A. They used MATLAB, Simulink, and Stateflow models to simulate unmanned aerial vehicle system behavior and to design components that supported autopilot and integrated navigation operation. They specified the RTOS mapping using Simulink blocks, then automatically generated flight code with Real-Time Workshop Embedded Coder to run on the embedded controllers under CsLEOS. This approach enabled them to design and test entire applications as models, and then rapidly implement them on the target system.
Developing and Debugging TI DSP Software for Power
Generator Controllers
Electrodynamics Associates uses
MathWorks tools to design and debug TI
DSP software for their 30 KW generator
controller. Their engineers model the
system in Simulink, then automatically
generate optimized code for the TI C6711
chip using Real-Time Workshop and the Embedded Target for TI
C6000. The Link for Code Composer Studio Development Tools
uses the JTAG Emulator and Real-Time Data Exchange capabilities
to facilitate code debugging and validation, measure the time consumed
while running on the DSP, monitor variables, and display
currents and voltages from the chip in real time.
Auto-Calibrating Embedded Algorithms on Automotive
Production ECUs
Bosch Diesel Systems has demonstrated how INCA and MATLAB can
be used together as a time-saving calibration system for vehicle ECUs.
MATLAB scripts are used to “drive” the engine to a certain operating
point at predefined conditions. MATLAB scripts then change parameters
of selected controllers to determine their stability criteria, using the
MATLAB API of the INCA Measurement and Calibration System from
ETAS to access parameters and measurements. The resulting data is then
analyzed in MATLAB using Fourier transforms and the Ziegler-Nichols
method to compute new calibration values for the
ECU’s software, which INCA then writes into the
ECU memory. This combination of MATLAB and
INCA performs automated calibrations
within half the time previously needed and
thus helps to meet the tight timelines of
modern ECU development projects.
Store
