 |
|
|
| |
|
TECHNICAL UPDATES |
| |
|
Products Updates |
| |
|
New Optimization Tool greatly simplifies solving of optimization
tasks
The Optimization Toolbox extends the MATLAB technical
computing environment with tools and widely used algorithms
for standard and large-scale optimization. These algorithms
solve constrained and unconstrained continuous and discrete
problems. The toolbox includes functions for linear programming,
quadratic programming, nonlinear optimization, nonlinear least
squares, nonlinear equations, multi-objective optimization,
and binary integer programming.
The New Optimization Tool GUI
With the latest release of Optimization Toolbox 3.1, users
can now solve optimization problems easily via the new Optimization
Tool (optimtool) graphical user interface. By using the optimtool
GUI, users can:
- Interactively
select a suitable solver and define optimization tasks
- Set
and inspect optimization options and their default values
- Run
problems and visualize results
- Import
and export problem definitions, algorithm options, and results
between the MATLAB workspace and the Optimization Tool
- Automatically
generate M-code to capture, automate, and recreate your
problem
- Access
built-in help

Figure 1: The Optimization Tool GUI
For
more information about Optimization Toolbox 3.1 please visits
the following URL:
http://www.mathworks.com/products/optimization/
To
learn more about the Optimization Tool GUI and how it facilitates
solving of optimization tasks, please visit the following
URL:
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/bqt8msp.html
The
MathWorks adds Support for Signal Integrity Engineering to
RF Toolbox
In RF Toolbox 2, The MathWorks have incorporated new functions
that enable signal integrity engineers to design, model, analyze,
and visualize networks of radio frequency (RF) components
commonly found in high-speed digital electronics. Now engineers
can better model the impedance differences and reflection
effects compromising signal distortion that occur with high-speed
semiconductor devices connected to backplanes and printed
circuit boards. By combining the new modeling capabilities
of RF Toolbox with the power of Model-Based Design in MATLAB®
and Simulink®, engineers can significantly reduce the
time required to develop I/O circuitry for these devices used
throughout the aerospace, defense, communications, and automotive
industries.

RF Toolbox
from The MathWorks now enables signal integrity engineers
to design, model, analyze, and visualize networks of radio
frequency components.
RF Toolbox
eliminates the need for manually building transmission line
models from measured data to test I/O circuit designs. Instead,
engineers can quickly model transmission lines as rational
functions, a type of behavioral model that is faster, more
accurate, and provides greater insight into transmission line
characteristics than traditional alternatives like inverse
fast Fourier transforms (IFFTs).
The added
capabilities in RF Toolbox complement the product's existing
support for designing, modeling, and analyzing networks of
RF components in wireless communications and radar projects.
Applying the same workflow, the new version helps engineers
design for signal integrity by letting them use network parameters
to specify RF filters, transmission lines, amplifiers, and
mixers, either directly or by their physical properties. Network
parameters can be generated from within MATLAB or read in
from external data. When data describing the response of the
backplane is imported into RF Toolbox, it generates a rational
function model that can be exported as a test environment
either into Simulink or directly into a Verilog-A-compatible
circuit simulator from an electronic design automation (EDA)
vendor. RF Toolbox also provides Smith® charts and rectangular
and polar plots for visualizing data.
For
more information about RF Toolbox, please visit the following
URL: http://www.mathworks.com/products/rftoolbox/
To
learn more about RF Toolbox through the following online recorded
webinar, please visit the following URL:
How
RF Toolbox can be used for Signal Integrity Engineering
To view
the demo, click
here.
|
| |
| |
| Tips
and Techniques |
| |
|
Debugging MATLAB M-files from the MATLAB Command Prompt
Part
2 - Moving from Workspace to Workspace
This
section is intended for anyone writing codes in MATLB who
would like to learn how to use MATLAB's tools to find and
eliminate bugs within their programs.
What
Debugging Tools Are Available at the MATLAB Command Prompt?
This section describes how to make use of functions to
debug programs from the MATLAB command prompt. There are altogether
seven topics and in the e-newsletter issue, we will look at
the second topic. The rest of the topics will be covered in
subsequent e-newsletter issues.
| Topics |
| 1. |
Setting,
Clearing, and Querying Breakpoints |
| 2. |
Moving
from Workspace to Workspace |
| 3. |
Executing Your Code Using the DBSTEP Function |
| 4. |
Displaying
Status Messages Periodically |
| 5. |
Using
the TRY/CATCH Block to Capture Errors |
| 6. |
Using
the ERROR Function with the LASTERR and RETHROW Functions |
| 7. |
The
WHICH Function |
Moving from Workspace to Workspace
Once you have entered debug mode (by reaching a line with
a breakpoint or a KEYBOARD statement on it or satisfying a
trap condition set using DBSTOP) you can use the DBUP
and DBDOWN
functions to move up and down the calling stack. This allows
you to trace an error back to the calling M-file if it involves
incorrect data being passed from a calling function's workspace
to the workspace of the function where the error occurs.
This is
not an issue with script files, as they use the workspace
of their caller (or the base workspace if called from the
command line or another script.) To display the entire calling
stack, use the DBSTACK
function.
As an
example, the testdbstack.m file, which is used to illustrate
the feature, is shown as follow:

In MATLAB
command prompt, type:
Then
run it by typing:
Once you
do this, you will see the following error message and the
prompt will change to the debug mode prompt:

The Editor/Debugger
will open (if it is not already open) to line 13. Verify that
it stopped on line 13 by typing:


This is
the calling stack. First MATLAB started testdbstack and executed
it up to line 8. Line 8 contains a call to a subfunction,
mytestfun, so that subfunction call is added to the stack.
The error occurred on line 13 of that function, which the
stack reflects.
Check
what value was passed to mytestfun by moving up the stack
1 level using

and verifying
that it moved up with


The green
arrow in the Editor/Debugger will move from line 13 of the
file to line 8, to show the position of the last command to
be executed. Now, verify that the variable MyInput referred
to on line 8 has the expected value (or confirm that the unexpected
value of MyInput is the cause of the problem) by typing
at the
MATLAB command prompt. Since MyInput is passing an unexpected
value to the function mytestfun, you have narrowed down the
cause of the error message. Now, check how MyInput was computed
and discover the problem - an unexpected minus sign.

For more
information on the DBSTACK, DBUP and DBDOWN functions, please
visit the following links:
DBSTACK:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/dbstack.html
DBUP:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/dbup.html
DBDOWN:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/dbdown.html
How to input data using the mouse?
Have
you intend your executing program to receive user data input,
not just through the keyboard but also using the mouse interactively
on a plot figure?
MATLAB
has a function to enable user input using the mouse.
| The
ginput function enables you to use the mouse or the arrow
keys to select points to plot. ginput returns the coordinates
of the pointer's position. |
 |
|
| |
| Code
below does a basic line plot through the points selected
with the mouse: |
| |
|
axis([0
10 0 10])
x=0; y=0;
while ~isempty(x)
|
[x1,y1]
= ginput(1);
plot([x x1],[y y1],'r.-');
hold on
x=x1; y=y1;
|
| end |
The example
below illustrates the use of ginput with the spline function
to create a curve by interpolating in two dimensions:
http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f10-21736.html

|
| |
| |
|
EVENTS & TRAINING |
| |
|
Learn and do more with MATLAB & Simulink
'Applying
Control Design with MATLAB, SIMULINK, Real-Time Workshop and
Stateflow' Training Course

The 4-day
course includes hands-on exercises with the Control System
Toolbox, Stateflow, Real-time Workshop, and shows how to linearize
a model and develop control laws using a variety of design
methodologies. Comprehensive control design case studies demonstrate
effective techniques for improving efficiency in the use of
MATLAB and SIMULINK for modeling and simulation. Participants
will be guided on the steps needed to design a controller
suitable for hardware implementation and will have the opportunity
to design their own control laws to control the magnetic levitation
device.
'Applying
Finite State Machine Modeling with Stateflow' Training Course

This one-day
course provides an understanding of how to use Stateflow to
model finite-state machine theory and supervisory logic. The
course discusses how to interact with Simulink, and graphically
build flow diagrams and functions. Code generation and sending
data out of Stateflow are briefly mentioned in this course
as well.
In-house
or customized training is also available on request, please
contact Activemedia at 6742-8173 for details. Other relevant
training courses provided by Activemedia include:
- Comprehensive
MATLAB
- Comprehensive
SIMULINK
- Applying
Signal Processing with MATLAB
- Applying
Image Processing Techniques with MATLAB and SIMULINK
- Applying
Neural Network with MATLAB
|
| |
| |
|
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
|
|
| |
| |
|
Customer Applications |
| |
|
DEQX
Improves Speaker Sound Quality with MATLAB
|
|
To develop an audio-correction technology that improves
speaker and room sound quality
|
|
|
Used MathWorks tools to develop and test the measurement,
calibration, and playback correction and equalization
algorithms on DSP hardware
|
|
|
Reduced development time by months
Awarded product of the year
Accelerated testing process |
|
| |
|
The
sound clarity from even the most expensive, high-end
speakers is compromised when they interact with a listening
room or studio's ambient acoustics. Professional recording
studios, such as the famous Abbey Road Recording Studios
in London, as well as electronics manufacturers and
home theatre owners are perfecting the quality of their
speakers with audio-correction technology from DEQX.
|

DEQX Calibrated
PDC 2.6 Digital Calibration Processor.
|
|
| |
|
DEQX,
an Australian digital audio technology company, produces
audio-correction technology that provides detailed room
measurements and tools that enhance room acoustics,
improve speaker power handling, and create a wider soundstage.
They use MathWorks tools to develop and test the measurement,
calibration, and playback correction and equalization
algorithms on DSP hardware, enabling users to calibrate
loudspeakers for their rooms.
"Our
goal is to make the speaker and listening room transparent
to deliver the most high-definition audio experience,"
says Brett George, software engineering manager at DEQX.
"MathWorks tools are such an important component
of our design process that I can't imagine how we could
have reached our goals without them."
Challenge
DEQX's
audio-correction technology needed to enable users to
measure their loudspeakers and rooms, and from those
measurements create correction filters that improve
the resulting sound from the speaker in a particular
environment. With such a varied range of input data,
their signal processing algorithms must be extremely
robust.
"It
is difficult to reliably design a loudspeaker that is
accurate across its entire bandwidth," Mr George
notes. "Furthermore, it is impossible to design
an analog crossover that is steep enough to separate
the interaction of each loudspeaker driver. We needed
to design signal processing algorithms to correct these
problems."
Finally,
in developing a product where there wasn't much existing
technology in the field, DEQX was under pressure to
deliver the best product in the shortest timeframe-before
their competitors.
"MATLAB
is the industry-standard tool for developing algorithms
using a high-level language. The Signal Processing Toolbox
also provided us with a great base of functions to begin
our development, saving us months of time."
|
|
Brett George
DEQX
|
| |
|
Solution
Using
MathWorks tools, DEQX developed custom speaker and room
correction software, part of a range of products based
on the calibration correction process. This process
enables speaker designers to provide levels of accuracy
and clarity in speakers to achieve the best possible
reproduction of audio source material.
DEQX's
development methodology involves initial research, followed
by a proof-of-concept and testing stage to confirm algorithms
work as expected. After reaching a satisfactory solution,
they develop and incorporate a real implementation into
the existing software.
During
the initial stages of software development, DEQX engineers
used MATLAB to develop and test algorithms that will
run on their custom DSP platform. They wrote the MATLAB
code in a similar way to the code that would run on
the DSP. Using this method, engineers confirmed that
the results were mathematically correct and avoided
spending unnecessary time writing custom C code. They
also used MATLAB to generate intermediate results to
test the algorithms in a DSP simulator.
"We
tested our ideas quickly and accurately with MATLAB,"
says Mr. George. "MATLAB was such an important
component of our design process that I can't imagine
how we would have progressed without it. Our only choice
would have been to write our own version of it!"
Using
MATLAB and the Signal Processing Toolbox, they implemented
signal processing functions to determine which components
would work on actual hardware before implementation.
This helped them to evaluate the effectiveness and feasibility
of their ideas before committing time to further development.
After
developing their algorithms in MATLAB, engineers used
the MATLAB Compiler to compile these algorithms into
C++. The compiled algorithms were then integrated with
the graphical user interface that they developed with
C++. This approach enabled DEQX to take advantage of
both languages-MATLAB for the mathematical algorithms
and C++ for the user interface software.
"The
integration between the compiled algorithms and Microsoft
Visual Studio is seamless," says Mr. George. "We
can change our MATLAB files, recompile them with the
MATLAB Compiler, and link them again in Visual Studio."
DEQX
has already released the first version of their hardware
and software. They are using MathWorks tools to develop
a more efficient version of their firmware to work at
higher sampling rates.
|
| |
|
Results
-
Reduced development time by months. "Developing
the main algorithm in C++ to calibrate speaker measurements
would have required us to write a linear algebra
class library and a suite of signal processing tools,"
says Mr. George. "MathWorks tools saved us 9-12
months of time by providing all those things and
accelerating our algorithm development."
-
Awarded product of the year. Electronic House
magazine has chosen DEQX Calibrated™ NHT Xd Loudspeakers
as one of its 2005 products of the year for its
technological innovation, outstanding features,
and overall value for money.
-
Accelerated testing process. "We need to test
all our algorithms thoroughly," says Mr George.
"Using MATLAB to generate a rigorous set of tests,
we automate a lot of the testing processes and significantly
speed up the testing process."
|
|
Products
Used
MATLAB®
MATLAB®
Compiler
Signal
Processing Toolbox
|
|
| |
|
 |
|