simulink lecture
TRANSCRIPT
Matlab and Simulink Mathworks, Inc. Natick, Massachusetts
Matlab/Simulink Web Resources http://www.mathworks.com
The Matlab/Simulink Student Version has the Signal Processing Tools but NOT the Communications tool set. The Mathworks/Simulink software installed at PCLAB is complete although usually one version behind the latest release, which is not a problem since Mathworks usually releases two versions a year.
Create a Mathworks account on the Mathworks web page which is required to view/download tutorial material. Also a good idea to use your UHCL email address for the Mathworks account which will tie you to the UHCL domain where all the UHCL Mathworks software is located.
For training on the use of the tools, look under Products & Services Demos and Webinars for all of the applicable products (Matlab, Simulink, Signal Processing Toolbox & Blockset, Communications Toolbox & Blockset, RF Toolbox, SimRF).
Silage Quick-Start Simulink Files (File Name: Silage.zip) used as a easy and quick start on gaining familiarity with the tools, Zip file on the course webpage.
Fig12.mdl Random Integer Generator (Comm Source/Sinks Display) Fig16.mdl ½ wave rectifier Fig18.mdl ½ wave rectifier Spectral Display Fig111.mdl Lowpass Filter Fig113.mdl Lowpass Filter Autocorrelation Fig116.mdl DSB AM with Coherent Demodulation Fig120.mdl Noncoherent Demodulator Fig312.mdl BPSK Simulation
Example of the Simulink code in the Simulink file Fig116.mdl
Fig 116.mdl DSP AM Communications Model Code File Model { Name "Fig116" Version 7.0 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.21" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings"
EE4512 Analog and Digital Communications Chapter 1
•• Modulation Modulation (partial definition):(partial definition):33:: to vary the amplitude, frequency, or phase of (a to vary the amplitude, frequency, or phase of (a
carrier wave or a light wave) for the transmissioncarrier wave or a light wave) for the transmissionof information (as by radio)of information (as by radio)
• Carrier Carrier (partial definition):(partial definition):2: an electromagnetic wave or alternating current whose 2: an electromagnetic wave or alternating current whose
modulations are used as communications signals (as modulations are used as communications signals (as in radio, telephonic, or telegraphic transmissionsin radio, telephonic, or telegraphic transmissions
EE4512 Analog and Digital Communications Chapter 1
•• Analog modulation:Analog modulation:continuouscontinuousinformation such asinformation such asspeechspeech or or videovideoencoded as anencoded as anamplitudeamplitude
•• Digital modulation:Digital modulation:discrete informationdiscrete informationsuch as such as binary databinary dataencoded asencoded asa a frequency shiftfrequency shiftorora a phase shiftphase shift
EE4512 Analog and Digital Communications Chapter 1
SourceSourceTransmitterTransmitter
UserUser
Analog amplitude modulation (AM)Analog amplitude modulation (AM)
MS Figure 1.16MS Figure 1.16
ChannelChannelwith noisewith noise
ReceiverReceiverSimulinkSimulink subsystemssubsystems
EE4512 Analog and Digital Communications Chapter 1
Analog amplitude modulation (AM)Analog amplitude modulation (AM)
MS Figure 1.16MS Figure 1.16
CoherentCoherentdemodulationdemodulation
ChannelChannelwith noisewith noise
SourceSourceTransmitterTransmitter ReceiverReceiver
UserUser
SimulinkSimulink subsystemssubsystems
EE4512 Analog and Digital Communications Chapter 1
ChannelChannelwith noisewith noise
Analog amplitude modulation (AM)Analog amplitude modulation (AM)
MS Figure 1.20MS Figure 1.20
NonNon--coherent demodulationcoherent demodulation
SimulinkSimulink subsystemssubsystemsSourceSourceTransmitterTransmitter ReceiverReceiver
UserUser
EE4512 Analog and Digital Communications Chapter 1
Sinusoidal input and DSB AMSinusoidal input and DSB AM
EE4512 Analog and Digital Communications Chapter 1
Sinusoidal input and DSB AMSinusoidal input and DSB AM
SimulinkSimulink subsystemsubsystem
EE4512 Analog and Digital Communications Chapter 1
DSB AM temporal signal and power spectrumDSB AM temporal signal and power spectrum
DSB modulated spectrum
Carrier
EE4512 Analog and Digital Communications Chapter 1
Demodulated DSB AM spectrumDemodulated DSB AM spectrum
Original spectrumDSB demodulated spectrum
2 x carrierfrequency
EE4512 Analog and Digital Communications Chapter 1
Digital binary phase shift keying (BPSK)Digital binary phase shift keying (BPSK)
MS Figure 3.12MS Figure 3.12
Random data sourceRandom data source Bit error rateBit error rate
EE4512 Analog and Digital Communications Chapter 1
•• Input binary data, rate Input binary data, rate rrbb = 1 kb/sec, bit time = 1 kb/sec, bit time TTbb = 1 msec = 1 msec
• Output binary data with no noise, note 2 bit delay in outputOutput binary data with no noise, note 2 bit delay in output
TTbb = 1 msec= 1 msec
EE4512 Analog and Digital Communications Chapter 1
•• Input binary data, rate Input binary data, rate rrbb = 1 kb/sec, bit time = 1 kb/sec, bit time TTbb = 1 msec = 1 msec
• Received signal with significant additive noiseReceived signal with significant additive noise
WhereWhere’’s the signal?s the signal?
EE4512 Analog and Digital Communications Chapter 1
•• Input binary data, rate Input binary data, rate rrbb = 1 kb/sec, bit time = 1 kb/sec, bit time TTbb = 1 msec = 1 msec
• Output binary data with Output binary data with bit errorsbit errors due to additive noisedue to additive noise
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• SimulinkSimulinkLibraryLibraryBrowser:Browser:CommonlyCommonlyUsed BlocksUsed Blocks
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• SimulinkSimulinkLibraryLibraryBrowser:Browser:CommunicationsCommunicationsBlocksetBlockset
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• SimulinkSimulinkLibraryLibraryBrowser:Browser:SignalSignalProcessingProcessingBlocksetBlockset
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• SimulinkSimulinkLibraryLibraryBrowser:Browser:SimulinkSimulinkExtrasExtras
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Simulink Library Browser Simulink Library Browser and the model windowand the model window
MS Figure 1.2MS Figure 1.2
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Source parameter block for the Source parameter block for the Random Integer Random Integer Generator Generator block and the block and the Simulink Simulink model windowmodel window
MS Figure 1.3MS Figure 1.3
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Configuration parameter window for the Configuration parameter window for the Simulink Simulink simulationsimulation
MS Figure 1.4MS Figure 1.4
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Sinusoid and half wave rectified sinusoid Sinusoid and half wave rectified sinusoid SimulinkSimulinktemporal model temporal model
MS Figure 1.6MS Figure 1.6
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Sinusoid and half wave rectified sinusoid temporal display Sinusoid and half wave rectified sinusoid temporal display in the in the Simulink Simulink Figures window Figures window MS Figure 1.7MS Figure 1.7
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Half wave rectified sinusoid Half wave rectified sinusoid SimulinkSimulink spectral display spectral display model model
MS Figure 1.8MS Figure 1.8
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Scope and axis properties parameter windows of the Scope and axis properties parameter windows of the Spectrum Scope Spectrum Scope blockblock MS Figure 1.9MS Figure 1.9
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Scaled power spectral display of a half wave rectified Scaled power spectral display of a half wave rectified sinusoid, sinusoid, ffoo = 1 kHz = 1 kHz
MS Figure 1.10MS Figure 1.10
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Gaussian noise source and lowpass filtered power Gaussian noise source and lowpass filtered power spectral density displayspectral density display MS Figure 1.11MS Figure 1.11
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Gaussian noise source and LPF PSD Gaussian noise source and LPF PSD MS Figure 1.12MS Figure 1.12
Flat PSDFlat PSD
LPF PSD, LPF PSD, ffcutoffcutoff = 11.25 kHz= 11.25 kHz
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Gaussian noise source and lowpass filtered Gaussian noise source and lowpass filtered autocorrelation displayautocorrelation display MS Figure 1.13MS Figure 1.13
EE4513 Analog and Digital Communications Laboratory Chapter 1
•• Gaussian noise source and lowpass filtered power Gaussian noise source and lowpass filtered power autocorrelation displayautocorrelation display MS Figure 1.14MS Figure 1.14
UncorrelatedUncorrelated
CorrelatedCorrelated