TECHNICAL UPDATES

Products Updates & information

Latest Release 2006a will be available in March 2006

In March 2006, the MathWorks will ship Release 2006a. The latest release includes updates to MATLAB and Simulink, plus one new product, major updates to 10 products, and minor updates and bug fixes to 62 products. R2006a introduces MATLAB for Windows x64 and provides new features for distributed computing, MATLAB application deployment to .NET, Simulink model viewing and sharing, and embedded software design and implementation.

Twice-Yearly Releases
This marks a significant change to The MathWorks approach to product releases. During the past year and a half, The MathWorks has shifted to a twice-yearly release schedule, with one release in the March timeframe and a second in the September timeframe. Each release synchronizes the full product family, delivering new features and bug fixes for existing products and, when available, new products.

Changes to Release Naming
The release naming convention has changed to reflect this twice-yearly schedule. The new release names consists of the calendar year followed by "a" for the first release of the year, or "b" for the second. For example, the March 2006 release will be named Release 2006a (or R2006a) because it is the first release in 2006. The release targeted for September 2006 will be named R2006b; the first release of 2007 will be R2007a, and so on.

Why This New Approach?
This twice-yearly release delivery model offers a number of benefits:

  • More rapid response to your requests for specific features due to more frequent releases.
  • Higher quality and improved backward compatibility, resulting from incremental development of new features to reduce the risk of introducing incompatibilities, combined with faster delivery of bug fixes.
  • Easier and more efficient upgrades, since the predictable schedule enables you to plan how and when to evaluate, test, and install new releases for yourself or your organization.

For more details on new products and latest features, please visit the following website
http://www.mathworks.com/products/new_products/latest_features.html?ref=fp2006a

All customers' current on our Software Maintenance Service will be notified via email once the R2006a is available.

The New SimBiology 1.0 is HERE!

SimBiology extends MATLAB and Simulink with tools for modeling, designing, simulating, and analyzing biochemical pathways. You can create your own model by manually entering in species, parameters, reactions, rules, kinetic laws, and units, or you can read in Systems Biology Mark-Up Language (SBML) models. You can simulate a model using stochastic or deterministic solvers, and graphically view the pathway in the block diagram explorer.

Key Features

  • Access to all functions via the command line and a graphical user interface
  • Stochastic, stiff deterministic, and nonstiff deterministic solvers
  • Model components, including species, parameters, kinetic laws, reactions, algebraic rules, and units
  • Project files that store models with simulation settings and user-defined plot types
 
Figure 1 - Model of the Yeast Heterotrimeric G Protein Cycle using Graphical Interface.
 
 
 
Figure 2 - Graphical representation of the Yeast Heterotrimeric G Protein Cycle.

For more information about SimBiology 1.0, please visit the following URL:
http://www.mathworks.com/products/simbiology/

To learn more about SimBiology through online demos, please visit the following URLs:

a. Stochastic Simulation of Radioactive Decay

Stochastically simulates the following model:

b. Yeast Heterotrimeric G Protein Cycle

Perform simulation for the yeast TMY101(wt) strain which shows the wild-type (catalyzed) rate of G-Protein inactivation as well as the TMY111(mut) strain which shows the mutant (uncatalyzed) rate of G-Protein inactivation.

http://www.mathworks.com/products/simbiology/demos.html?file=/products/demos/shipping/simbio/gprotein.html

 
Technical Applications

Rapidly Acquiring Data with Sound Card.

MATLAB and the Data Acquisition Toolbox offer a single, integrated environment to support the entire data acquisition and analysis process. It lets you configure your external hardware devices, read data into MATLAB for immediate analysis and send out data for visualization.

Generally, a typical data acquisition session consists of these four steps:

  1. Initialization: Creating a device object.
  2. Configuration: Adding channels and controlling acquisition behavior with properties.
  3. Execution: Starting the device object and acquiring or sending data.
  4. Termination: Deleting the device object.

For this example, we will verify that the fundamental (lowest) frequency of a tuning fork is 440 Hz. To do this, we will use a microphone and a sound card to collect sound level data. Finally, we will perform an FFT on the acquired data to find the frequency components of the tuning fork.

We begin by acquiring two seconds of sound level data on one sound card channel. Since the tuning fork vibrates at a nominal frequency of 440 Hz, the sound card sampling rate can be set to its lowest sampling rate of 8000 Hz.

After we have set the tuning fork vibrating and placed it near the microphone, we will trigger the acquisition. The complete data acquisition session for the sound card is shown below.

  1. Initialization: Creating an analog input device object (AI) for the sound card.
  2. AI = analoginput('winsound');

  3. Configuration: Next, we add a single channel to AI, and set the sample rate to 8000 Hz with acquisition duration of 2 seconds.
  4. addchannel(AI, 1);
    Fs = 8000; % Sample Rate is 8000 Hz
    set (AI, 'SampleRate', Fs)
    duration = 2; % 2 second acquisition
    set(AI, 'SamplesPerTrigger', duration*Fs);

  5. Execution: Starting the device object and acquiring or sending data.
    Now, we are ready to start the acquisition. The default trigger behavior is to start collecting data as soon as the start command is issued. Before doing so, you should strike the tuning fork to begin supplying a tone to the microphone (whistling will work as well).
  6. start(AI);

    To retrieve all the data
    data = getdata(AI);

  7. Termination: The acquisition ends once all the data is acquired. To end the acquisition session, we can delete the AI object from the workspace.

delete(AI)

Finally, we can determine the frequency components of the tuning fork and plot the results. First, we calculate the absolute value of the FFT of the data.

xfft = abs(fft(data));

Next we convert the absolute value into dB magnitude and extract the real frequency components:

mag = 20*log10(xfft);
mag = mag(1:end/2);

The results show the fundamental frequency to be around 440 Hz and the first overtone to be around 880 Hz. A simple way to find actual fundamental frequency is:

[ymax,maxindex]=max(mag);

The answer is 441 Hz.

For more information about Data Acquisition Toolbox, please visit the following URL:
http://www.mathworks.com/products/daq/

For more information about other related application demos, please visit the following URL:
http://www.mathworks.com/products/signal/demos.html

 
Tips and Techniques

 

Speed up MATLAB with Vectorization

Why is my MATLAB program running slow? If your program is constructed with multiple iterative loops (e.g. for, do, while etc.), you may want to vectorize your algorithms to improve speed.

To "vectorize" a computation means to replace iterative operations with vector operations. MATLAB is matrix based, designed for vector and matrix operations. You can often speed up your program by using vectorized algorithms that take advantage of this design.

How to vectorize my algorithm?

Consider the following MATLAB function:

function d = maxDistance(x,y)
% Find the max distance between a set of points
 
 
numP = length(x) % Obtain number of points
 
for k = 1:numP  
  d(k) = sqrt(x(k)^2 + y(k)^2); % Compute the distance
 
end  
 
d = max(d); % Get the maximum distance

The above function finds the maximum distance, given a set of points. Firstly, the distance is computed and stored in d. Then, the maximum distance is obtained using max.

To vectorize the distance computation, replace the for loop with vector operations.

function d = maxDistance(x,y)
% Find the max distance between a set of points
 
d = sqrt(x.^2 + y.^2); %Compute the distance
 
d = max(d); %Get the maximum distance

The modified code above performs the same function as the previous code, except that this code uses per-element operator. List of Arithmetic Operations:
(http://www.mathworks.com/access/helpdesk/help/techdoc/ref/func_b32.html#7050).

You can compare the performance of the above functions by using tic and toc to measure the elapsed time or Profiler.

 

 EVENTS & TRAINING
Training
Learn and do more with MATLAB.

Training Courses by Specialized Applications

Activemedia offers introductory and intermediate courses in MATLAB and SIMULINK as well as advanced training in specialized applications, such as signal processing, control design, and financial analysis.

To find out which course caters to your specific training needs, contact us for a non-obligation consultation today!

Course Highlights for Mar-Apr:

Applying Control Design with MATLAB & SIMULINK

Comprehensive control design case studies demonstrate effective techniques for improving efficiency in the use of MATLAB and SIMULINK for modeling and simulation. The course includes hands-on exercises with the Control System Toolbox and SIMULINK Control Design, and shows how to linearize a model and develop control laws using a variety of design methodologies.

Applying Image Processing Techniques with MATLAB

This two-day course shows how to perform various image processing techniques using the Image Processing Toolbox. The course explores the different types of image representations, how to enhance image characteristics, image filtering, and how to reduce the effects of noise and blurring in an image. It also introduces different methods used to extract features and objects within an image, image registration, and a few techniques for reconstructing images/objects. A demonstration of the Image Acquisition Toolbox will also be introduced in the course.

Applying Signal Processing with MATLAB and SIMULINK

This 2-day course presents signal processing in the MATLAB environment, including the capabilities of the Signal Processing and Filter Design toolboxes, as well as the basics of using the Signal Processing Blockset in SIMULINK to analyze and design a signal processing system. The first part includes an introduction to signal processing with a concentration on representations of signals in MATLAB, special analysis, and working with linear, time- independent system models. Also, it covers filter design, with comprehensive instruction on FIR, IIR, adaptive, and multirate filters. Filter quantization and implementation are also discussed. The second part will emphasizes discrete-time simulations and includes topics on buffering and vector operations, digital filter design and implementation, transforms, and power spectrum estimation. Frame-based processing and the use of fixed-point data are also discussed.

Applying Communication Design with SIMULINK

This two-day course focuses on the design of common communication systems. Using real-world examples, instruction covers how to design end-to-end communication systems with SIMULINK, the Communications Blockset, and the Signal Processing Blockset. Applications built during the training include digital modem designs with different types of data, channels, coding, and modulation techniques; carrier recovery; software-defined radio and equalization; OFDM modem and Hiperlan2; and ADSL.

SIMULINK for Xilinx and DSP Design Flow (5-Day)

This is a 5-day training package that provides system architects, DSP designers, and FPGA designers a hands-on course covering the basics of using SIMULINK and the Xilinx design flow for implementing DSP functions. You will learn how to use Simulink to perform system-level DSP design, approach the complexities of high-performance DSP design and implement a design from algorithm concept to hardware verification using Xilinx automatic translation (System Generator) and implementation (ISE) tools.

 

 
Customer Applications

Flying-Cam Develops Autonomous Mini-Helicopter Controller with MathWorks Tools

Challenge To develop an autonomous helicopter control to support aerial camera shots in the film industry
Solution Use MathWorks tools to model a complete control system, generate code, and run hardware-in-the-loop simulations
Results
  • Development time reduced.
  • Real-time controller implemented without errors.
  • Learning curve eliminated.

 

With movie credits for the James Bond, Harry Potter, and Mission Impossible film series, and an Academy Award for technical achievement, Flying-Cam has an established reputation for delivering reliable, precision aerial filming. The company's mini-helicopters, which weigh 30 lbs and carry a movie camera with a top air speed of 75 mph, enable directors to shoot from virtually any position, including close-ups and sweeping aerial views.
Flying-Cam's autonomous mini-helicopter
capturing footage from a Formula 1 test run.

Piloting helicopters is a complex skill requiring hundreds of training hours. Flying mini-helicopters by remote control on complex movie shots requires even more specialized expertise. Using MathWorks tools for Model-Based Design, Flying-Cam has developed an advanced autopilot control system that simplifies remote helicopter control and enables better image stability.

"We developed a sophisticated autopilot control system with MathWorks tools that enables novices to perform basic flight with only minutes of training and allows our skilled pilots to perform extremely difficult maneuvers," explains Dr. Marco La Civita, developer and director of technology innovation at Flying-Cam.

Challenge

Developing an advanced helicopter autopilot system would enable pilots to conduct more complicated film shoots and allow directors to perform identical takes in which the helicopter automatically retraces its path. The system would also open new business opportunities for Flying-Cam by enabling less-experienced users to pilot helicopters for search and rescue, surveillance, law enforcement, and aerial mapping.

To achieve these goals, the company would need to address several technical challenges, such as developing a sophisticated control system that incorporated pilot control input with sensor input to deliver image stability and precise tracking while adjusting for wind effects. Because they also had limited in-house experience in real-time software implementation, Flying-Cam would require modeling and automatic code-generation tools.

"If I had to rely on someone else to code the controller after I designed it, I would always wonder if problems were introduced during the implementation. With MathWorks tools, I know that if the helicopter is working on my laptop, then the real-time implementation will work, too."

Marco La Civita,
Flying-Cam

Solution

Working on his own with MathWorks tools, La Civita completed all stages of the engineering effort for the autopilot control system, including modeling, simulation, automatic code generation, and hardware-in-the-loop testing.

Using a modeling technique developed in his Ph.D. thesis, La Civita created a nonlinear model of the helicopter by combining first principles of physics with system identification data obtained during flight tests. He then imported the model into MATLAB and Simulink for control system synthesis and analysis.

The control system receives input from the pilot to control thrust, pitch, roll, and yaw as well as input from an onboard inertial navigation/GPS system. Working from specifications for the control system and the linear models extracted from the nonlinear model, La Civita used the Robust Control Toolbox and the Control System Toolbox to design the controller by applying loop shaping and robust stabilization.

Using the Optimization Toolbox and genetic algorithms, La Civita determined the proper loop-shaping weights to satisfy the various and conflicting specifications.
La Civita then used Simulink to simulate the controller and the helicopter, introducing factors such as delays and rate and range servo saturation. Simulink scopes enabled him to perform linear analysis and verify step responses, input response, and transfer functions. He then used Real-Time Workshop to automatically generate C code from the controller model for PC/104 embedded hardware.

To verify the model and code, La Civita first used Simulink and the nonlinear model. Later, he used xPC Target to conduct hardware-in-the-loop tests and actual flight tests.
Throughout development, Flying-Cam received expert support from The MathWorks. "When I had a question, there was always someone with knowledge and expertise to help me," says La Civita.
Flying-Cam's first helicopter equipped with the autonomous controller has passed initial flight tests, and the company is moving the new design into field testing and production. They are integrating the helicopter and camera controls into one unit and a system that will enable the helicopter to be preprogrammed to follow a flight plan without pilot assistance.

Flying-Cam is exploring applications in other industries made possible by the advanced autopilot controller.

Results

  • Development time reduced. "Designing an autopilot for an aircraft can take four months or more with a group building the model, a group developing the control, and a group handling implementation," explains La Civita. "With MathWorks tools, I accomplished the entire task alone in three months."
  • Real-time controller implemented without errors. "Bugs are always possible in the controller. With MathWorks tools, however, I don't have to worry about the real-time implementation of the controller model because I trust the code will work," says La Civita.
  • Learning curve eliminated. "Before this project, I had no experience with writing real-time software, so I was concerned about the learning curve," says La Civita. "Using Real-Time Workshop, I just pressed a button to build the code. It was extremely easy."

Products Used

 

Visit www.activemedia.com.sg or Contact us at:

Singapore:
(65) 6742 8173
enquiry@activemedia.com.sg

Malaysia:
(60) 3 7880 8522
enquiry@activemedia.com.my

Thailand:
(66) 2 612 9390-1
info@activemedia.in.th