Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
by Dick Benson
Consulting Applications Engineer
The Mathworks Inc.
dbenson@mathworks.com
50 DSP magazine Copyright © 2005 Xilinx, Inc. All rights reserved. XILINX, the Xilinx logo, and other designated brands included herein are trademarks of Xilinx, Inc. All other trademarks are the property of their respective owners. October 2005
Model-Based Design
Having one set of cost-effective integrated
tools that you can use to design, verify,
partition, and automatically generate code
for both FPGAs and DSPs is now a reali-
ty. The Mathworks calls this process
“model-based design.”
The concept is quite simple. First, you
create a functional implementation inde-
pendent model of the system. This is an
“executable specification,” a model that
forms the basis of all that is to follow. Once
you have verified the model to achieve your
system objectives, you can incorporate fur-
ther detail, such as adding fixed-point
effects, RF/ADC non-idealities, and parti-
tioning the design between high-speed
fixed-point hardware (an FPGA) and lower
speed hardware (a DSP). At every step of
the process, you verify that the model
Figure 1 – A top-level view of a GPS system, including a transmitter with
achieves the performance goals. The final timing error, channel model with Doppler, and a receiver with timing and
step is to use the automatic code generation Doppler de-rotation loops. The model contains numerous levels of hierarchy.
capability to flawlessly implement the A glimpse down one level into the receiver is shown in the lower right.
model on hardware.
the correlation is maximized to estimate the inset. The transmitter model allows
GPS Receiver the time difference between the received timing errors to be introduced while the
The GPS system has been fully operational signal and the signal transmitted by the channel model includes Doppler shift.
with 24 satellites in its constellation since satellite. The range is directly proportion- These impairments test the receiver timing
1994. It is used by millions of people, both al to time; therefore, with four satellite recovery and carrier tracking loops.
civilian and military, every day. The funda- ranges, and knowing the positions of the Once the simulation meets the required
mental concept of using code-division mul- satellites, you can navigate. performance goals, it becomes an exe-
tiple access (CDMA) for time-delay Like all CDMA systems, the design of a cutable specification. In theory, the model
measurement (yielding range) while allow- GPS receiver presents some formidable implements the GPS physical layer accord-
ing all satellites to share the same carrier fre- challenges. The satellites are traveling at ing to written specifications that you can
quency (1.57542 GHz for civilian access) close to 7,000 km per hour, giving rise to a find in the public domain.
has not changed in the past 30 years. Doppler shift ranging from -6000 to
Each GPS satellite uses a unique 1,023- +6000 Hz. They are 20,200 km away, run- Verify the Model and Partition
chip orthogonal code (Gold code) to ning low-power (50W) transmitters. Studies have shown that defects are most
spread the low-speed binary phase shift Signals at the terrestrial receiver input are often introduced at the beginning of a
keying (BPSK, 20 ms per bit) navigation typically 20 dB or more below the noise design. Before adding more detail to the
data bitstream. The chipping clock rate is level. And the local receiver clock is never model, it is prudent to verify that it truly
1.023 MHz, and therefore the sequence of in step with the ultra-precise Cesium clocks implements a GPS receiver. The MATLAB
1,023 chips repeats every millisecond. in the satellites, so Doppler and symbol language is becoming increasingly popular
The GPS receiver generates a local timing recovery loops need to be imple- in test and measurement applications. The
copy of the same Gold code, which is mented as well as acquisition logic. Instrument Control Toolbox option for
then cross-correlated with the incoming MATLAB can communicate with virtually
signal. When the receiver code phase An Executable Specification any instrument that has a hardware inter-
aligns with the incoming signal code Figure 1 shows a top-level view of a face. Beyond this, several test and meas-
phase, there is a +30 dB improvement in Simulink model. It contains the transmit- urement vendors have integrated
the SNR (10*log10(1023)), and the ter, channel, receiver, and measurement MATLAB into their instruments. Anritsu
BPSK navigation bitstream can then be visualization subsystems. This model has is one such company; their Signature spec-
easily detected. Roughly speaking, you numerous levels of hierarchy – a glimpse trum analyzer can capture data into MAT-
can use the local code time offset, where under the hood of the receiver is shown in LAB with a single mouse click.