0% found this document useful (0 votes)
279 views

Mems & Nems Lab Manual

The document outlines the laboratory experiments for the EE3023/MEMS and NEMS Laboratory course, including simulations of MEMS sensors and actuators using MATLAB Simulink. It details specific experiments such as simulating piezo resistive sensors, piezoelectric actuators, and biosensors, along with their aims, required software, theoretical background, and procedures. Additionally, it covers the importance of pulse measurement in biosensors and the design considerations for accurate readings.

Uploaded by

rsa.eee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
279 views

Mems & Nems Lab Manual

The document outlines the laboratory experiments for the EE3023/MEMS and NEMS Laboratory course, including simulations of MEMS sensors and actuators using MATLAB Simulink. It details specific experiments such as simulating piezo resistive sensors, piezoelectric actuators, and biosensors, along with their aims, required software, theoretical background, and procedures. Additionally, it covers the importance of pulse measurement in biosensors and the design considerations for accurate readings.

Uploaded by

rsa.eee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

IV YEAR-VII SEMESTER

EE3023/MEMS and NEMS LABORATORY (REGULATION 2021)

DEPARTMENTOFELECTRICAL&ELECTRONICSENGINEERING
List of Laboratory experiments:

Simulation of MEMS sensors and actuators using Multi physics tool

a) Simulation of a typical piezo resistive sensor

b) Simulation of a typical Piezoelectric actuator

c) Simulation study of a bio sensor

d) Simulation study of a micro motor

INDEX
Marks
Page
S.NO DATE NAMEOFEXPERIMENT INITIAL
No

EXPNO:1 SIMULATION OF A TYPICAL PIEZO RESISTIVE SENSOR


AIM:
To simulate a typical piezo resistive sensor by using MATLAB simulink

SOFTWARE REQUIRED:

1. Sim Power System

2. MATALAB

THEORY:

A simplified electrical circuit diagram of a piezoresistive sensor with current excitation is shown
in Figure. The resistance of a conductor is proportional to its length so stretching increases the
resistance. As the conductor is stretched, its cross-sectional area is reduced, which also increases
the resistance. The inherent resistivity of some materials increases when it is stressed.

Arrangement of Piezo resistors:

As mentioned above, there are usually four piezo resistors in the sensing diaphragm in order
to construct a full Wheatstone bridge circuit. The piezo resistors are grouped in pairs: the
variation tendency of resistance is same within the pair and is inverse between pairs. Thus, the
settled directions of the piezo resistors should be carefully determined, concerning the stress
distribution of diaphragm. Taking the flat square diaphragm for instance, the common positions
for piezo resistors are shown in Figure:1Firstly, all piezo resistors can be located at the edge of
diaphragm, and two work as the transverse unit to sense the stress along their length, and the
other two work as the longitudinal unit to sense the stress along their width. The transverse and
longitudinal units will be stimulated by the stress with different positive/negative states, and they
will produce a resistance variation with a different tendency. Then, the scheme in Figure 1
(b)sets two piezo resistors at the center while setting the other two at the edge of the sensing
diaphragm. The edge ones sense the tensile stress, and the two central ones sense the
compressive resistance, and the resistance variation is also in accord with the requirement from
the Wheatstone bridge. Generally, the former configuration is more popular in the development
of pressure sensors, but the latter is also favorable in some special-shaped diaphragms. As for the
location of edge piezo resistors, some researchers have claimed that it is helpful in improving
sensitivity to extend them beyond the diaphragm to the chip frame. For most piezoresistive
pressure sensors, the sensing diaphragm works under the bottom-fixed constraint shown
in Figure 2a. Different from the simplified edge-clamped constraint (Figure 2b), the mechanical
stress will distribute beyond the diaphragm’s edge, and it will generate a high-stress region
within a certain area in the chip frame (Figure 2c). However, it is not a simple task to calculate
the actual area for this region, making this method unpopular in the development of pressure
sensors.
Figure 1. The common positions for piezo resistors in a square diaphragm: (a) all at the edge and (b) two at the edge
and the other two at the center.

Figure 2. The working state of a diaphragm: (a) bottom fixed, (b) simplified edge clamped, and (c) the stress under
different working states.
Instructions to run the simulator
 Simulator contains 6 steps
 Introduction
 Configuration
 Connection
 Characterization
 Calibration
 Fault Detection
Procedure to run the simulator's 6 steps:
1. Introduction
 Select the application.
 Read the theory and start the test.
 Attempt all the questions from the test and submit the test.
 Click Next level.
2. Configuration
 Select P/I converter type and do necessary calculation to configure it.
 After Successful configuration click Next Level.
3. Connection
 According to selected P/I converter type, Select the require components from symbol library to
do the connections.
 Click check connection button.
 After successful connection click Next Level button.
4. Characterization
 Take multiple readings to check output of P/I converter.
 Plot the graph for the same readings.
 Click Next Level
5. Calibration
 Calculate zero error, span error, linearity and Average Percentage Accuracy.
 Calibrate the P/I converter.
 Remove zero error
 Remove span error.
 Try to get the linearity.
 Click Next Level
6. Fault Detection
SIMULATION DIAGRAM:

RESULT:
EXPNO:2 SIMULATION OF A TYPICAL PIEZOELECTRIC ACTUATOR

AIM:
To simulate atypical piezoelectric actuator by using MATLAB simulink

SOFTWARE REQUIRED:

1. Sim Power System

2. MATALAB

THEORY

The Piezo Actuator


Actuators are device components that facilitate the conversion of signal energy into a required or
necessary controlling motion. For example, when you press a button signaling an electric actuator to
transfer that button press signal into a rotary motion to either close or open a valve. This type of
functionality is highly desirable in applications that need precise positioning of mechanical devices.
A Piezo actuator functions on the inverse piezoelectric effect; when we apply voltage, the actuator
will contract or expand. However, when we block the actuator from moving, it will generate a force.
We typically use a load in the direction of travel to achieve the necessary blockage of movement.
The relationship between force and displacement in piezo materials is an inverse relationship. In
summary, the more force an actuator has to generate against a load, the less movement (travel) it can
produce. Conversely, a freely moving actuator that encounters no resistance to its motion will
generate its maximum displacement (travel). Since they create zero force, we refer to these particular
types of actuators as free stroke.
Types of Piezo Actuators
Whether the application is for mirrors on satellites or non-magnetic and miniaturized medical
devices, there is a type of piezo actuator in line with the task. Piezo actuator types include pneumatic,
hydraulic, electric, and mechanical. Aside from the category list of actuator types above, two other
types of actuators that warrant mentioning are Stack Actuators and Stripe Actuators.
A Piezo stack actuator provides a low stroke with a high blocking force. Depending on your design
requirements, a piezo stack actuator can be either co-fired or discrete. If it is indeed discrete (high-
voltage stack actuators), then its composite structures are made by separately stacking finished
piezoelectric ceramic rings or discs and metal electrode foil with an adhesive. Typically, operating
voltages range from 500 to 1,000 volts.
Now, co-fired stack actuators (multilayer) are also called monolithic stacks, and they do not utilize
adhesives. However, they do use high-temperature sintering of the complete electrode and ceramic
pile, and their operating voltage can be as much as 200 volts. In either case, discrete or co-fired, it is
possible to protectively insulate them from environmental extremes and mechanical stresses.
Achieving this typically involves using bare stacks, coating materials, or encasing them in stainless
steel.
RESULT:
EXPNO: SIMULATE THE PERFORMANCE OF A BIO-SENSOR
3

Aim: To study the performance of Biosensor (Pulse measurement technique)

Objective:

1. Understand the importance of Pulse measurement


2. Study the technique used for Pulse measurement
3. Understand the design considerations for biosensor (Pulse measurement sensor)

Prerequisite

Before performing this experiment, student must have knowledge about

1. Working of a typical diode and LED


2. Light spectrum
3. Effect of various factors that affect the light output of an LED, e.g. temperature,
wavelength, etc.

What is a pulse rate?


Pulse is the rate at which human heart beats. Pulse is also commonly called Heart Rate, which is
the number of times the heart beats each minute (bpm). As the heart pumps blood through human
body, one can feel a pulse in the blood vessels close to the skin's surface, such as wrist, neck, or
upper arm. Counting pulse rate is a simple way to find out how fast the heart is beating.
However, the rhythm and strength of the heartbeat can also be noted, as well as whether the
blood vessel feels hard or soft. Changes in human heart rate or rhythm, a weak pulse, or a hard
blood vessel may be caused by heart disease or another problem. One can check the pulse, the
first thing in the morning, just after waking up but before getting out of bed. This is called a
resting pulse. The pulse rate can be measured by counting the beats in a set period of time (at
least 15 to 20 seconds) and multiplying that number to get the number of beats per minute. Our
pulse changes from minute to minute. It will be faster when one exercises, have a fever, or is
under stress. It will be slower at resting condition.

Importance of Pulse Measurement:

Pulse is checked to:

 See how well the heart is working. In an emergency situation, the pulse rate can help to
check whether the heart is pumping enough blood or not.
 Find the cause of symptoms, such as an irregular or rapid heartbeat (palpitations),
dizziness, fainting, chest pain, or shortness of breath.
 Check for blood flow after an injury or when a blood vessel is blocked.
 Check on medicines or diseases that cause a slow heart rate. The doctors may ask to
check the pulse every day for heart patients or persons undergoing medical treatments
with certain medicines that can slower the heart rate.
 Check general health and fitness level. Checking the pulse rate at rest, during exercise, or
immediately after vigorous exercise can give important information about overall fitness
level.
Measurement:

There are two approaches to developing a probe for pulse measurement. The first is
transmittance, the second is reflectance. The difference is in the way the elements within the
probe are positioned. A transmittance probe has a LED on one side and a photodiode (light
detector) on the other. The tissue to be imaged (commonly a finger or an ear) is inserted between
the two.

A reflectance probe has the LED and the photodiode on the same side. It must be placed over a
point with underlying bone. Light is emitted by the LED, passes through tissue and blood
vessels, reflects off bone, passes through the tissues again, and is then detected. A significant
amount of light will reflect off the skin in the reflectance setup, and, unlike in the transmittance
setup, this light will be detected. Thus, reflectance probes have a high offset and a lower signal-
to-noise ratio than the transmittance probes. Reflectance setups also require a significantly
greater amount of light. Thus, either more LEDs or more photodiodes need to be used.
Transmittance probes are commonly placed on a finger or ear and are very convenient to attach
and remove. Reflectance probes can be placed on the forehead or the sternum. Their advantage is
that, regardless of the patient's size (infants to very large adults); the attachment site is always
similar. Both, the transmittance and the reflectance probes are used clinically, though the
transmittance probe is more common due to the simplicity of signal analysis and convenience of
attachment.
Photoplethysmography:

The device used to measure the amount of blood in part of the body using light is commonly
known as photo-plethysmograph. It measures the variation in amount of light passing through
your finger caused by the pulsatile nature of blood flow. A light source is placed on one side of
the finger, and a light sensitive transducer like LDR (Cadmium Sulfide (CdS) cell) or a photo
diode or a phototransistor, on the other side. By monitoring variations in the output of the
transducer an indication of blood flow in the finger is obtained. A simple block diagram of one
such system is shown here.

A typical Pulse Oximeter uses the basic principle of a pair of small LEDs operating at two
different wavelengths; one red LED with a wavelength of 660nm, the other, an infrared LED
with a wavelength of 910nm. The LEDs are designed to be placed opposite a photodiode that

detects the light from the LEDs. As the amount of blood in the capillaries depends on the actual
blood pressure, which varies around the heart the heart pulse cycle, the heart rate can also be
measured. The two wavelengths are chosen for the reason that deoxygenated hemoglobin has a
higher absorption at around 660nm and at 910m oxygenated hemoglobin has the higher
absorption. The oxygenated hemoglobin allows red light to transmit through and absorbs more
infrared light while the deoxygenated hemoglobin allows infrared to transmit through and
absorbs more red light. Usually, a finger is placed between the source (LEDs) and the receiver
(photodiode) acting as a translucent site with good blood flow. The photodiode produces current
linearly proportional to the intensity of light striking it. A photodiode cannot distinguish between
red and infrared light, but to accommodate this, the microprocessor system alternately turns each
LED on and off. The pulse oximeter repeatedly samples the photodiode output while the red
LED is on, while the infrared LED is on and while both are off. By sampling with both LED's
off, the pulse oximeter is able to subtract any ambient light that is present.
Design Considerations:

1. Motion Artifacts:
The motion artifact is a major problem that is observed due to the patient's muscle movement.
This induces false pulses that are similar to actual pulses. The false pulses when processed can
produce incorrect results. This problem is particularly significant in patients that do not remain
still during monitoring, and mainly in active infants. To reduce these artifacts digital signal
processing is performed and the pulse average values over several seconds are taken, before they
are displayed.

2. Optical interference:
All pulse monitors are affected by bright external light sources. In order to achieve accurate
measurements, potential sources of optical interference must be controlled. Optical interference
occurs when bright light from an external source (ambient light) reaches the photodiode directly
- without passing through the finger. Proper care is to be taken to avoid this.

3. Effect of temperature:
Temperature affects the peak wavelength, spectral line-width, and output power of LEDs. In an
LED based white light source, this can result in change in the color coordinates, color
temperature, color rendering index, luminous efficiency. Efficiency of the source will change as
the season (hot summer, cold winter) or even time of the day changes (warm day cold night). It is
experimentally proved that the effect of shifts in wavelength of the LEDs on pulse monitor
accuracy is negligible as the temperature increases from 0°C to 50°C.

4. Effect of distance between source and sensor:


The distance between the LED and photodiode is one of the major design considerations when
designing a reflectance pulse meter sensor. The ratio of AC to DC signal acquired by the
photodiodes increases almost linearly with the distance between the LEDs and photodiodes.
Greater separation between the optical elements means more tissue is able to absorb and reflect
light. However, as the separation between the elements increases, the LED power required to
produce a good signal increase almost exponentially. Thus, the ideal separation between the
optical elements involves balancing signal quality and power consumption. However, it is
important not to place the photodiode too close to the LEDs. If the photodiode is placed too close
to the LEDs, the photodiode will be saturated as a result of the large DC component obtained by
the multiple scattering of the incident photons by the blood free layers of the skin.

Advantages:

 Fast operation
 Easy to use
 Accurate readings
 Non-invasive method of measurement
 Reliable

Limitations:

This instrument is used to measure number of pulses per minute. It cannot check for amount of
blood flow i.e. sufficient or insufficient. Also, it cannot give the account of hemoglobin present
in blood.
Level 1: Calibration of the probe

Aim: To study the calibration of given source-sensor probe

Step by step Procedure:

1. Click on Calibration Tab.


2. You are provided with a circular disc having 60 equally spaced holes on its periphery.
3. The disc is connected to a DC motor. The speed of the motor can be adjusted in steps of
0.5 rpm up to 2 rpm.
4. Select the speed by using drop down tab.
5. Click on Start Rotation Tab.
6. The disk will start rotating. The BPM (Bits per minute) are indicated on the display.
7. Repeat the procedure for different speed if necessary.
8. Now level 2 tab will be enabled. Click on level 2 tab.

Level 2: Measure the pulse using given source-sensor probe

Aim: To measure the pulse rate using given source-sensor probe

Step by step Procedure:

1. Select the patient age by using drop down menu. The reading will be indicated on the
display.
2. Click on 'Show range in this age group'. Compare the display reading with this range.
3. Find out the patient status (Healthy/ Unhealthy)
4. Repeat steps 2and 3 for various age groups.
5. Now level 3 tab will be activated. Click on this tab to enter in level 3.

Level 3: Study effect of different types of errors on Biosensor performance

Aim: To study effect of Stray light and effect of misalignment on Biosensor Performance

Step by step Procedure:

1. Click on Error Tab.


2. Select the type of error for which the performance of sensor is to be studied using drop
down menu.
3. For Stray light effect the display reading goes out of range.
4. For effect of misalignment, drag the LED from its center position in up or down direction
and observe the effect on the displayed reading. The initial reading when the sensor is
properly aligned; is the same one as displayed in the measurement part.
RESULT:
EXPNO:4 SIMULATION STUDY OF A MICRO MOTOR

AIM:
To simulate atypical piezoelectric actuator by using MATLAB simulink

SOFTWARE REQUIRED:

1. Sim Power System

2. MATALAB

THEORY:

1. Introduction
Micro DC motor has the advantages of small volume, high efficiency, high torque, convenient
control and low cost. It has been widely used in the fields of consumption, office, computer,
home appliance, medical treatment and industrial control. Although China's micro-motor
production started late, the basic micro-motor manufacturing technology has been mastered, and
there are more than a thousand micro-motor production enterprises in Zhejiang, Fujian,
Guangdong and other coastal areas. In order to regulate the quality of micro-motor products, the
National Micro-Motor Standardization Technical Committee has revised a series of relevant
national standards for the quality of micro-motor. Likewise, in order to ensure the quality of
manufactured products, enterprises have to conduct100% testing of the products in the
production line. However, due to the lack of effective automated detection methods for testing,
the current micro-motor product testing is through artificial methods.
The manual detection method cannot be guaranteed because of the experience, emotion
and state of the testing operator. So, the effectiveness of the testing cannot be guaranteed.
Therefore, it is necessary to find an on-line automatic detection method of micro-DC motor for
the assurance of product quality. There are lots of research in Motor health diagnosis and fault
detection at home and abroad, but the research mainly focuses on large motors, AC induction
motor and brushless DC motor. The literature of the fault detection and diagnosis of Micro-DC
motor is less common. In order to detect the quality of micro-DC motor, paper uses two motors
with the same type, to do the same motor, a generator composed of electric power drag system,
given a different drive voltage conditions, measuring speed, power voltage, armature current
parameters, to determine the five indicators reflect the motor consistency model for motor
performance testing. According to the time-frequency characteristics of the armature current, a
fault diagnosis model of micro-DC motor based on fault multi-feature quantity is proposed,
which is used to diagnose the fault of micro-DC motor. The above method can realize the
diagnosis of typical faults under certain conditions, but because the model used for the diagnosis
cannot fully reflect the electromechanical characteristics of the micro-DC motor, the diagnosis
cannot be of universal significance. With the modern signal processing technology widely used
in fault diagnosis, it should also be fully applied to micro-DC motor fault diagnosis, but because
the micro-DC motor mathematical model cannot be resolved, most scholars can only numerical
methods and computer simulation methods, such as the establishment of micro-DC motor model
and its parameters are estimated, the use of model parameters and micro-DC motor
electromechanical characteristics of the corresponding relationship between the micro-DC motor
characteristics (armature inductance, coil resistance, induced electromotive force, mechanical
rotation Inertia and friction coefficient, etc.),
According to the characteristics of the characteristics of the trend can be identified on the
fault and then its fault diagnosis and diagnosis, but the motor modeling of the literature mostly
for large motors or brushless motors, micro-DC motor modeling research rarely reported. The
modeling of DC motor is studied based on Simulink, but the simulation only simulates the no-
load situation and lacks versatility. Here, the state equation of micro-DC motor is established
according to the electrical and mechanical energy transfer relation. By introducing the
electromagnetic torque and mechanical torque equation, the simulation problem of DC micro-
motor under load condition is solved, and the simulation model based on MATLAB/ Simulink is
established. Through this model can be a good motor and a variety of
fault motor simulation analysis.
2. Dynamic model of micro-DC motor
Fig.1 for the micro-DC motor electrical, mechanical model, In Fig.1, u 、r 、i、m L 、e
respectively represents drive voltage, armature coil resistance, armature current, coil inductance
and back electromotive force, represent the magnetic flux generated by the armature current、0
T 、1 T respectively represent electromagnetic torque, no-load torque and load torque; J
、respectively represent the moment of inertia and angular velocity.
Figure 1. Electricity, machine characteristics model of micro-DC motor
According to the principle of motor mechanics, the electromagnetic torque generated by the
magnetic flux should be equal to the mechanical torque of the motor drive shaft. Therefore, the
electrical and mechanical characteristics of Fig. 1 can be expressed by the dynamic equation [9],


Simulation model:

Simulation and experiment results


The motor is widely used in the fields of optical drive, printer, home appliance and so on. The
social demand is very large, and it is of great theoretical and engineering significance to study
the general micro-DC motor produced by a motor factory. Its electrical parameters as follows
Table 1. Parameters of experiment micro-DC motor
Parameter name Value
Rated voltage 5.0 V DC
Working voltage range
1.5 V ~ 9.0 V DC
Rated torque 0.0015Nm
No-load speed (rated voltage)
6050±650 r/min
Fixed load speed 2800±300 r/min
No-load current 50mA max
Starting current 500mA max

Result:
EXP NO: 5 SIMULATION OF TYPICAL PIEZOELECTRIC ACTUATOR

AIM:

To simulate a typical piezoelectric actuator by using MATLAB simulink.


.
SOFTWARE REQUIRED:

1. Sim Power System.


2. 2. MATALAB.

THEORY:

Hybrid actuator consisting of a DC motor plus lead screw in series with a piezoelectric stack.
The DC motor and lead screw combination supports large displacements (tens of millimeters),
but is dynamically slow when tracking the reference demand x_ref. Conversely the piezoelectric
stack only supports a maximum displacement of +-0.1mm, but has a very fast dynamic response.
By combining the two actuator technologies, a large stroke actuator with precision control
Results. An example application is antenna control when tracking a satellite - large amplitude
motion with time constants measured in a few seconds is required to move between satellites,
whereas fine control is required to track a given non-geostationary satellite.

PROCEDURE:

1. In MATLAB software open a new model in File->New->model.

2. Start SIMULINK library browser by clicking the symbol in toolbar

3. And Open the libraries that contain the blocks you will need. These usually will include

the sources, sinks, math and continuous function block and possibly other.

4. Drag the needed blocks from the library folders to that new untitled Simulink window.

You must give it a name using the Save As menu command under the File menu heading.

The assigned filename is automatically appended with .slx extension.

5. Arrange these blocks in orderly way corresponding by Matlab Model Shown in Block
diagram.
BLOCK DIAGRAM:

OUTPUT:

Rotor Angle (deg)


Piezo Stack Demand

Linear Position (mm)


RESULT:
EXP NO:6 SIMULATION STUDY OF MICRO MOTOR

AIM:

To simulate a typical Micro motor by using MATLAB simulink.


.
SOFTWARE REQUIRED:

3. Sim Power System.


4. 2. MATALAB.

THEORY:

Micromotors are very small particles (measured in microns) that can move themselves. The term is
often used interchangeably with "nanomotor" despite the implicit size difference. These
micromotors actually propel themselves in a specific direction autonomously when placed in a
chemical solution. There are many different micromotor types operating under a host of
mechanisms. Easily the most important examples are biological motors such as bacteria and any
other self-propelled cells. Synthetically, researchers have exploited oxidation-reduction reactions
to produce chemical gradients, local fluid flows, or streams of bubbles that then propel these micro
motors through chemical media. Different stimuli, both external (light, magnetism and internal (fuel
concentration, material composition, particle asymmetry) can be used to control the behavior of
these micro motors.

PROCEDURE:

1. In MATLAB software open a new model in File->New->model.

2. Start SIMULINK library browser by clicking the symbol in toolbar

3. And Open the libraries that contain the blocks you will need. These usually will include

the sources, sinks, math and continuous function block and possibly other.

4. Drag the needed blocks from the library folders to that new untitled Simulink window. You

must give it a name using the Save As menu command under the File menu heading. The

assigned filename is automatically appended with .slx extension.

5. Arrange these blocks in orderly way corresponding by Matlab Model Shown in Block diagram.
BLOCK DIAGRAM:

OUTPUT:

MOTOR CURRENT
MOTOR SPEED (rpm)

RESULT:
EXP NO: 7 SIMULATION OF FETAL HEART BEAT SIGNAL

AIM:

To simulate a fetal heart beat signal by using MATLAB simulink.


.
SOFTWARE REQUIRED:

1. Sim Power System.


2. MATALAB.

THEORY:

The fetus heart beat signal is faster than that of its mother, with rates ranging from 120 to 160
beats per minute. The amplitude of the fetal electrocardiogram is also much weaker than that
of the maternal cardiogram. The fetal heart beat signal eliminates the maternal heart beat
signal from the fetal electrocardiogram signal. The canceller needs a reference signal
generated from a maternal electrocardiogram to perform the task. The measured fetal
electrocardiogram signal from the abdomen is usually dominated from the chest cavity and
converges reasonably after few seconds.

PROCEDURE:

1. In MATLAB software open a new model in File->New->model.

2. Start SIMULINK library browser by clicking the symbol in toolbar

3. And Open the libraries that contain the blocks you will need. These usually will

include the sources, sinks, math and continuous function block and possibly other.

4. Drag the needed blocks from the library folders to that new untitled Simulink window.

You must give it a name using the Save As menu command under the File menu

heading. The assigned filename is automatically appended with .slx extension.

5. Arrange these blocks in orderly way corresponding by Mat lab Model Shown in Block
diagram.
PROGRAM:

x1 = 3.5*ecg(2700).';
y1 = sgolayfilt(repmat(x1,69,1),0,21);
Hmhb = dsp.SignalSource(y1,'SamplesPerFrame',100,...
'SignalEndAction','Cyclic repetition');
x2 = 0.25*ecg(1725).';
y2 = sgolayfilt(repmat(x2,108,1),0,17);
Hfhb = dsp.SignalSource(y2,'SamplesPerFrame',100,...
'SignalEndAction','Cyclic repetition');
mnoise = 0.02*randn(size(y1));
Hmn = dsp.SignalSource(mnoise,'SamplesPerFrame',100);

Hts = dsp.TimeScope('SampleRate',4000,'YLimits',[-
4,4],'TimeSpan',2.5);
for k = 1:length(y1)/Hmhb.SamplesPerFrame
x = step(Hmhb) + step(Hmn);
step(Hts,x);
end
Wopt = [0 1.0 -0.5 -0.8 1.0 -0.1 0.2 -0.3 0.6 0.1];
Hd = dsp.FIRFilter('Numerator',Wopt);
fnoise = 0.02*randn(size(y2));
Hfn = dsp.SignalSource(fnoise,'SamplesPerFrame',100);

release(Hts);
for k = 1:length(y2)/Hfhb.SamplesPerFrame
d = step(Hd,step(Hmhb)) + step(Hfhb) + step(Hfn);
step(Hts,d);
end
Hlms = dsp.LMSFilter('Length',15,'StepSize',0.00007);
release(Hts); release(Hmn); release(Hfn); reset(Hd);
Hts.YLimits = [-0.5,0.5];
for k = 1:length(y2)/Hfhb.SamplesPerFrame
mhb = step(Hmhb);
d = step(Hd,mhb) + step(Hfhb) + step(Hfn);
x = mhb + step(Hmn);
[~,e] = step(Hlms,x,d);
step(Hts,e);
end
OUTPUT:

RESULT:

You might also like