Professional Documents
Culture Documents
Rajshahi University of
Engineering & Technology
Experiment No.: 01
1.3 OBJECTIVES
To learn about different blocks in the Simulink
To learn about the MATLAB function in Simulink
To learn about the Hit Cross block in Simulink
1.4 THEORY
1.4.1 HIT CROSS
Hit crossing was used to detect crossing any particular value of the signal. By default, it was
given to detect zero crossing. So, by default it acted as a zero-crossing detector. It can also be
modified to detect any signal level other than zero.
1.4.2 EXERCISE
The problem was given as,
S1 = Sine wave (Vmax = 1 V ; f = 50 Hz)
S2 = Triangular wave (VP-P = 0 to 1 V ; f = 500 Hz)
S3 = Triangular wave (VP-P = -1 to 0 V ; f = 500 Hz)
Now,
Output 1 = 1 ; S1 ≥ S2
0 ; else
Output 2 = 1 ; S1 ≤ S3
0 ; else
Again,
Output final = Output 1 ; S1 > 0
0 ; else
Now, we are to design and simulate the given system in Simulink platform.
1.5 BLOCK DIAGRAM
1.5.1 HIT CROSS
FIGURE 01(a): Block Diagram of Zero Crossing Detector using Hit Cross
FIGURE 01(b): Block Diagram of 0.5 Crossing Detector using Hit Cross
1.5.2 EXERCISE SYSTEM DESIGN
FIGURE 02(a): Block Diagram of the designed system using blocks only
FIGURE 02(b): Block Diagram of designed system using MATLAB Function
CODE
if s1 >= s2
x=1
else
x=0
end
if s1 <= s3
y=1
else
y=0
end
if s1 > 0
z=x
else
z=y
end
1.6 OUTPUT
1.6.1 HIT CROSS
1.8 CONCLUSION
To build a practical circuit or, system first of all it’s required to design and simulate the system
in a software for a test run. The Simulink platform had a lot of blocks. With the help of these
blocks nearly all types of circuits or, systems could be designed and simulated in this platform.
So, it’s very convenient to use the Simulink platform for this purpose