Skdjejdjdjrjr Hehehrhehr Hehehehehe
Skdjejdjdjrjr Hehehrhehr Hehehehehe
To design any model using Matlab/Simulink, the following steps are considered:
1. Open the MATLAB tool.
2. From the home tap select Simulink
3. The following window is open. From the new tap of this window select blank model.
4. The following window is open and from the library browser select the required block.
1
Communication LAB 3rd class
5. The library browser has many categories and toolboxes as shown in the figure below.
6. Select the required block by right click on the block and select >> add
block to new model (untitled or (name)).
7. Set the required parameter on each block and connect between them.
8. Run the model and observe the results
Example:
This example generates two signals using two different blocks. The first one
is sawtooth signal and the second one is sine wave. The following figures (1,
2, and 3) represent the model with the parameters.
2
Communication LAB 3rd class
Figure. 1
Figure. 2
3
Communication LAB 3rd class
Figure. 3
Example
% Generation of sinusoidal signals using script (as in Figure .4)
% 2sin( 2πt-π/2)/ figure below
t=[-5:0.01:5];
x=2*sin((2*pi*t)-(pi/2));
plot(t,x)
4
Communication LAB 3rd class
Figure.4
5
Communication LAB 3rd class
AIM: Design a first order low pass filter in Simulink for the given
specifications; test the designed model for a sinusoidal input signal at
various frequencies.
6
Communication LAB 3rd class
7
Communication LAB 3rd class
EXPERIMENT NO:2
AMPLITUDE MODULATION AND DEMODULATION
Figure 1
Figure 2 represents the required parameters.
Figure 2
Figure 3 clarifies the signals at the transmitter and Figure 4 clarifies the signals at the
receiver
8
Communication LAB 3rd class
Figure 3
Figure 4
9
Communication LAB 3rd class
Figure 5
Figure 6 clarifies the signals at the transmitter (DSB-LC) and Figure 7 clarifies the signals
at the receiver (DSB-LC).
Figure 6
10
Communication LAB 3rd class
Figure 7
What is the difference between DSB-SC and DSB-LC?
11
Communication LAB 3rd class
EXPERIMENT NO:3
SINGLE SIDE BAND MODULATION AND DEMODULATION
AIM: To study the function of Single Side Band modulation (SSB) &
Demodulation
The block diagram of single side band modulation is illustrated in Figure 1.
Figure 1
Figure 2 shows the model of SSB in Simulink for both modulation and
demodulation and Figure 3 shows the parameters for each block in the
model.
12
Communication LAB 3rd class
Figure 2
Figure 3
Figure 4 clarifies the output of the demodulated signal of SSB with the
message signal.
13
Communication LAB 3rd class
Figure 4
The spectrum analyzer and zero-order hold are added to the model in Figure
2 to show the frequency domain of the signals. The zero-order hold block
use to sample the analog signal in its input (so the sampling time must be
setting) to create a discrete signal on its output. the sampling time of zero-
order hold is set to 0.00005. the frequency domain of SSB is shown in
Figure 5
Figure 5
14
Communication LAB 3rd class
Now, we design a low pass filter using transfer function block instead of
analog filter design block as in Figure 6. First, one transfer function is added
to model then the second transfer function added to improve the
demodulated signal (parameters are set in Figure 7). The output of scope4 is
shown in Figure 8 that compare the demodulated signal with the message
signal.
LPF
Figure 6
15
Communication LAB 3rd class
Figure 7
Figure 8
A common low pass filter can be made from a simple RC circuit with the
capacitor as the output. Thus, a passive low pass filter is mentioned as a low
16
Communication LAB 3rd class
pass filter RC circuit. The example of low pass filter RC can be seen in
Figure 9.
Figure 9
The transfer function in s domain:
𝑉𝑜𝑢𝑡 𝑤𝑐 1
𝐻(𝑠) = = ; 𝑤𝑐 =
𝑉𝑖𝑛 𝑠 + 𝑤𝑐 𝑅𝐶
17
Communication LAB 3rd class
EXPERIMENT NO:4
FM MODULATION AND DEMODULATION
FREQUENCY MODULATION
We saw in AM that the information contents of 𝑚(𝑡) (information signal) is
transmitted through changing the amplitude of the carrier in proportion to
the amplitude of 𝑚(𝑡). In the angle modulation, the information content is
transmitted through changing the frequency of the carrier instead. The
instantaneous frequency of the carrier is determined by the value of the
baseband signal. In this modulation type, the carrier frequency varies in a
proportion to the amplitude of the message signal 𝑚(𝑡) as in Figure 1.
Figure 1
𝑭𝑴 = 𝑨𝒄 𝐜𝐨𝐬[∫ 𝒘𝒄 𝒕 + 𝒌𝒇 𝒎(𝒕)𝒅𝒕]
18
Communication LAB 3rd class
Figure 2
Figure 3 shows the modulated signal and Figure 4 presents the demodulated
signal compared with information signal.
Figure 3
19
Communication LAB 3rd class
Figure 4
Figure 5
20