0% found this document useful (0 votes)
4 views36 pages

Ead Final 3676

The document outlines a series of engineering experiments conducted using MATLAB and LTSpice, focusing on various simulations including mass-spring-damper systems, trigonometric identities, rectifiers, RLC circuits, and operational amplifiers. Each experiment includes objectives, required apparatus, theoretical background, simulation circuits, output graphs, and precautions to ensure accuracy and safety. The document serves as a comprehensive guide for students in engineering analysis and design.

Uploaded by

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

Ead Final 3676

The document outlines a series of engineering experiments conducted using MATLAB and LTSpice, focusing on various simulations including mass-spring-damper systems, trigonometric identities, rectifiers, RLC circuits, and operational amplifiers. Each experiment includes objectives, required apparatus, theoretical background, simulation circuits, output graphs, and precautions to ensure accuracy and safety. The document serves as a comprehensive guide for students in engineering analysis and design.

Uploaded by

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

S.NO.

OBJECTIVE DATE SIGN

1. Mass-spring-damper system in 22/01/25


Simulink.

2. sin^2(theta)+cos^2(theta)=1 in 29/01/25
Simulink.

3. Full wave rectifier in Simulink. 05/02/25

4. Underdamped, overdamped, 12/02/25


critically damped response in RLC
ckt using Simulink, by changing the
values of R,L,C.

5. Inverting and Non-inverting op-amo 19/02/25


ckt. in LTSPICE.

6. Simulate square and triangular 26/02/25


wave in LTSPICE.

7. MATLAB code to solve quadratic 05/03/25


equation.

8. MATLAB code to find ‘day’ of any 12/03/25


given data.

9. Euler’s method to solve dy/dx=1 19/03/25


where y(0)=1.

10. Euler's method to solve dy/dx=-y 26/03/25


where y(0)=1.

11. Runge-Kutta method to solve 02/04/25


dy/dx=y-x^2.

12. Runge-Kutta method to solve 09/04/25


dy/dx=(y-x)/(y+x)
Netaji Subhas University of Technology
New Delhi, 110078
Subject: - Engineering Analysis and Design
Experiment List

Instruction for file:


1. Aim (Times New Roman, Bold, font size=12)
2. Apparatus (version of MATLAB used, components used in MATLAB, Times New
Roman, font size=12)
3. theory (Times New Roman, font size=12)
4. simulation circuit and basic circuit (Pic, Explanation of circuit, Times New Roman, Bold,
font size=12)
5. Output waveform (Explanation, background white x and y axis - FONT - Times New
Roman, FONT SIZE - 12 points, black color of axis + Title + Legend)

MATLAB (List of Experiment)


1. To simulate the output waveform of the RLC series circuit using MATLAB.
2. To Simulate the waveform of half wave controlled and uncontrolled rectifier using
MATLAB.
3. To Simulate the waveform of full wave controlled and uncontrolled rectifier using
MATLAB.
4. To simulate the mass-spring damper system using MATLAB.
5. To simulate the working of liquid level system using MATLAB.
6. To simulate the working of P, PI and PID controller for different linear systems using
MATLAB.
7. To simulate the working of P, PI and PID controller for different Non-linear systems using
MATLAB.
8. To observe the VI characteristics of solar PV system at different radiation and temperature
using MATLAB.

LT-SPICE (List of Experiment)


1. To study the half and full wave rectifier in LTSPICE.
2. To study the working of inverting and non-inverting Op-amp.
3. To study the working of linear transformer circuit.
4. Develop and test a physical mass-spring-damper PLANT in open loop control system.
5. Develop and test a physical mass-spring-damper PLANT in open loop control system
with P, PI and PID control.
Experiment-1

Aim
To develop mathematical and Simulink models for a Mass-Spring-Damper system and
observe the step response

Software/Hardware Used ASUS Vivobook 15, MATLAB (version R2024b), Simulink


Toolbox (version 24.2)
Theory
The mass-spring-damper model is a fundamental mechanical system used to describe the
dynamic behavior of objects subjected to external forces. It comprises discrete mass nodes
distributed within an object and interconnected through a network of springs and dampers.
Each mass node represents a localized portion of the object, while the springs and dampers
simulate the mechanical connections between these nodes.

In this model, the masses represent the inertial properties of the object, with their mass values
determining how they respond to applied forces. The springs mimic the elastic properties of the
material, providing resistance to deformation and restoring forces when displaced from
equilibrium. The dampers, on the other hand, introduce a damping effect that dissipates energy
and reduces oscillations within the system.
Deriving the equations of motion for this model is usually done by examining the sum of
forces on the mass:

(Fig-4.1-Mass Spring Damper Diagram)


The mass-spring-damper model is particularly suitable for simulating objects with complex
material properties, such as nonlinearity and viscoelasticity. Nonlinearity refers to materials
whose mechanical response deviates from linear behavior, often exhibiting phenomena like
hysteresis or nonlinear stiffness. Viscoelastic materials display both viscous (damping) and
elastic (spring-like) characteristics, causing time-dependent deformation under applied loads.
By incorporating these elements into the model, engineers can accurately simulate the dynamic
behavior of objects subjected to various loading conditions. This allows for the prediction of how
the object will respond to external forces, enabling the optimization of design parameters and
the assessment of structural integrity.

Furthermore, the mass-spring-damper model finds widespread application across numerous


fields, including mechanical engineering, civil engineering, robotics, and biomechanics. It
serves as the foundation for more complex dynamic simulations, such as finite element
analysis (FEA) and multi-body dynamics (MBD), providing valuable insights into the behavior
of real-world systems and aiding in the development of innovative technologies.

Precautions-
• Ensure that the circuit is properly modelled and simulated according to the specifications
and operating conditions.
• Choose appropriate component values for the circuit to avoid damage or overloading to the
circuit or the simulation program.
• Double-check the connections and node names in the schematic to avoid errors or
incomplete circuits.
• Use appropriate signal sources and apply safe voltage and current levels to the circuit to
avoid damaging the components or simulation program.
Simulation Circuit

(Fig-4.2-Mass Spring Damper Simulation Circuit)

(Fig-4.3-Mass Spring Damper Analogous Diagram)

Output Graph

(Fig-4.4-Mass Spring Damper Waveform)


EXPERIMENT 2

AIM : To simulate and verify the identity sin²(θ) + cos²(θ) = 1 in MATLAB Simulink using basic
Blocks.

APPARATUS REQUIRED: Simulink

THEORY : The trigonometric identity:​


sin²(θ) + cos²(θ) = 1​
is a fundamental result in trigonometry and is true for all real values of θ.

In this experiment:

●​ Sine and cosine signals of the same frequency are squared.​

●​ Their squares are summed.​

●​ The result should be a constant value equal to 1, demonstrating the identity.​

SIMULINK CIRCUIT :

OUTPUT :
Precautions:

●​ Ensure both Sine Wave blocks have the same frequency and amplitude.​

●​ Set the Phase of one Sine Wave block to π/2 to simulate cos(θ).​

●​ Use the square operation in the Math Function block.​

●​ Keep a small simulation step size (e.g., 0.01) for smooth curves and accurate results
Experiment-3

Aim
To Simulate the waveform of full wave controlled and uncontrolled rectifier using MATLAB.

Software/Hardware Used ASUS Vivobook 15, MATLAB (version R2024b), Simulink


Toolbox (version 24.2)
Theory
A full wave rectifier is a crucial electronic circuit employed in converting alternating current
(AC) voltage into direct current (DC) voltage. Its primary function is to allow current flow in
only one direction, either positive or negative, during each half cycle of the AC voltage,
resulting in a unidirectional flow of current. Unlike half-wave rectifiers, which utilize only one
half of the AC waveform, full-wave rectifiers harness both positive and negative cycles,
thereby doubling the efficiency and producing a smoother DC output.

Among full-wave rectifiers, the most prevalent type is the bridge rectifier. This configuration
employs four diodes arranged in a bridge pattern. During the positive half cycle of the AC
voltage, two diodes conduct, enabling current to flow through the load in one direction.
Similarly, during the negative half cycle, the other two diodes conduct, facilitating current
flow in the opposite direction. This alternating conduction of diodes ensures that the load
receives a continuous supply of current, resulting in a more efficient rectification process
compared to half-wave rectifiers.

The output of a full wave rectifier exhibits a pulsating DC waveform, containing both positive
and negative voltage peaks. However, to obtain a smoother DC output suitable for most
applications, additional filtering is required. This is typically achieved using a filter circuit
comprising capacitors or inductors. These components help reduce the ripple voltage present
in the output, ensuring a more stable and constant DC voltage supply.

(Fig-3.1-Full Wave Rectifier Diagram)


Full wave rectifiers find extensive application in various fields, especially in power supplies for
electronic devices. They are commonly used in devices such as laptops, mobile phones,
televisions, and other electronic gadgets that require a steady DC voltage from an AC power
source. Additionally, full-wave rectifiers are employed in industrial applications, such as motor
control systems, lighting systems, and battery charging circuits, where efficient conversion of
AC to DC voltage is essential for proper operation.

(Fig-3.2-Full Wave Rectifier Waveform)

In summary, full wave rectifiers, particularly bridge rectifiers, play a pivotal role in converting
AC voltage to DC voltage efficiently. By utilizing both halves of the AC waveform, they offer
higher efficiency and smoother output compared to half-wave rectifiers. With their versatility
and widespread application, full-wave rectifiers serve as indispensable components in modern
electronic systems, ensuring reliable and stable DC power supplies for various devices and
equipment.

Precautions-
• Ensure that the circuit is properly modelled and simulated according to the specifications
and operating conditions.
• Choose appropriate component values for the circuit to avoid damage or overloading to the
circuit or the simulation program.
• Double-check the connections and node names in the schematic to avoid errors or
incomplete circuits.
• Use appropriate signal sources and apply safe voltage and current levels to the circuit to
avoid damaging the components or simulation program.
Simulation Circuit

(a)Controlled Rectifier

(Fig-3.3-Full Wave Controlled Rectifier Circuit)


Output Graph

(Fig-3.4-Full Wave Controlled Rectifier Waveform)


Simulation Circuit
(a)Uncontrolled Rectifier

(Fig-3.5-Full Wave Uncontrolled Rectifier Circuit)

Output Graph

(Fig-3.6-Full Wave Uncontrolled Rectifier Waveform)


EXPERIMENT-4

SHOW UNDERDAMPED,OVERDAMPED AND CRITICALLY DAMPED RESPONSE IN RLC


CIRCUIT USING SIMULINK BY CHANGING THE VALUES OF R,L,C.

AIM:

To analyze and compare the transient responses of an RLC circuit under different damping
conditions—underdamped, critically damped, and overdamped—using Simulink by varying the resistor
(R) value while keeping the inductor (L) and capacitor (C) constant.

APPARATUS REQUIRED:

Hardware: Function Generator, Oscilloscope, Resistors (1 Ω, 2 Ω, 5 Ω), Inductor (1 H), Capacitor (1 F),
Breadboard, Wires.

Software: MATLAB with Simulink.

Optional: Multimeter, Data Acquisition System.

DIAGRAM:

THEORY:

An RLC circuit consists of a resistor (R), inductor (L), and capacitor (C) connected in series or parallel.
The transient response of the circuit is influenced by the damping ratio (ζ\zetaζ), which determines the
nature of the response when the circuit is subjected to a step input.

Damping Conditions:
1.​ Underdamped (ζ<1\zeta < 1ζ<1):

o The circuit exhibits oscillations before settling.

o Occurs when resistance is low.

2.​ Critically Damped (ζ=1\zeta = 1ζ=1):

o The circuit returns to equilibrium quickly without oscillations.

o Achieved with the optimal resistance for fast settling.

3.​ Overdamped (ζ>1\zeta > 1ζ>1):

o The circuit has no oscillations, but the response is slow.

o Happens when the resistance is high.

CIRCUIT:

RESULT:

· Underdamped (R=1 ΩR = 1 \, \OmegaR=1Ω): Oscillatory response before settling.

· Critically Damped (R=2 ΩR = 2 \, \OmegaR=2Ω): Fastest settling without oscillations.


· Overdamped (R=5 ΩR = 5 OmegaR=5Ω): Slow response with no oscillations.

PRECAUTIONS:

· Ensure proper connections.

· Use accurate resistor values.

· Maintain a stable power supply.

· Avoid overloading components.

· Ensure proper grounding.

· Monitor for overheating.


EXPERIMENT 5

AIM:​
To simulate inverting and non-inverting operational amplifier circuits in LTspice,
and to analyze their behavior using MATLAB for waveform visualization and analysis.

SOFTWARE REQUIRED:

●​ LTspice (for circuit simulation and data export)​

●​ MATLAB (for data visualization and waveform analysis)​

THEORY:

Operational Amplifier (Op-Amp) is a fundamental building block in analog electronics.


Two basic configurations are:

1.​ Inverting Amplifier​


- Input signal is applied through a resistor to the inverting terminal.​
- Non-inverting terminal is grounded.​
- Gain is given by:​
A = -Rf / Rin​

2.​ Non-Inverting Amplifier​


- Input signal is applied to the non-inverting terminal.​
- Inverting terminal is connected to a resistor divider network (Rf and Rin).​
- Gain is given by:​
A = 1 + (Rf / Rin)​

These configurations can be simulated using LTspice to observe time-domain


responses and analyze output waveforms.

SIMULATION DIAGRAM
1.​ Inverting Amplifier
OUTPUT

2.​ Non - Inverting Amplifier


OUTPUT

RESULT : The MATLAB plot shows the input and output waveforms of the op-amp
circuits:

●​ In the inverting configuration, the output is 180° out of phase with the input and
scaled by the gain factor.​

●​ In the non-inverting configuration, the output is in phase with the input and
amplified based on the resistor ratio.​

PRECAUTIONS:
1.​ Ensure correct resistor values (Rin and Rf) are used to achieve the desired gain.​

2.​ In LTSpice, connect power supplies (V+ and V−) to the Op-Amp for proper
operation.​

3.​ Export the simulation data in a readable format (CSV or TXT) for MATLAB.​

4.​ In MATLAB, make sure to match the file name and data format while loading.​

5.​ Verify the node voltages in LTSpice to ensure proper data export (e.g., add
.plot directives or use the waveform viewer correctly).​
EXPERIMENT-6

DRAW CIRCUIT TO SIMULATE SQUARE WAVE AND TRIANGULAR WAVE IN LTSPICE.

AIM:

To design and simulate circuits in LTSpice to generate square and triangular waveforms, analyze their
behavior, and understand their applications in electronic systems.

APPARATUS REQUIRED:

· LTSpice Software (for circuit simulation)

· Voltage Source (PULSE for square wave, DC for integrator)

· Resistors and Capacitors (for waveform shaping)

· Operational Amplifier (e.g., LM741 for integrator)

· Ground Connection

THEORY:

Square Wave Generation:

●​ A square wave is a periodic waveform that alternates between two levels, typically high and low
(e.g., +5V and 0V).
●​ It can be generated using a pulse voltage source with a PULSE function in LTSpice or an
astable 555 timer circuit.
●​ The waveform is characterized by a 50% duty cycle, where the high and low states last for equal
durations.

Triangular Wave Generation:

●​ A triangular wave is a continuous, piecewise-linear waveform that rises and falls linearly over
time.
●​ It can be generated using an integrator circuit built with an op-amp, resistor, and capacitor.
●​ The square wave input is integrated (i.e., the area under the curve is calculated), producing a
triangular waveform.
●​ The slope of the triangular wave depends on the input signal frequency and the RC time constant.

CIRCUIT:
RESULT:

The simulation successfully generated square and triangular waves in LTSpice, matching theoretical
expectations with correct frequency, amplitude, and waveform shape.

PRECAUTION:

Ensure correct component values for accurate waveform generation.

Verify proper connections in the circuit to avoid simulation errors.


EXPERIMENT 7

Aim:To write a MATLAB program to solve a quadratic equation of the form ax^2 + bx +
c = 0 and find its roots (real or complex) using the quadratic formula.

Software Required:

●​ MATLAB (R2016b or later versions recommended)

Theory:

A quadratic equation in one variable is a second-degree polynomial and is generally


expressed as:

ax2+bx+c=0 , where a≠0

The nature of the roots depends on the discriminant , calculated as:

D=b2−4ac

Depending on the value of the discriminant:

●​ If D>0D > 0D>0: The equation has two real and distinct roots.​

●​ If D=0D = 0D=0: The equation has two real and equal roots.​

●​ If D<0D < 0D<0: The equation has two complex conjugate roots.​

The roots are computed using the quadratic formula:

MATLAB can handle both real and complex numbers, which makes it a convenient tool for
solving such equations.
CODE-

RESULT -
Conclusion:

The experiment successfully demonstrates how to solve a quadratic equation using MATLAB.​
Based on the coefficients provided, the program calculates the discriminant, determines the
nature of the roots, and accurately displays them.
Experiment-8

Aim To develop a MATLAB program that takes a user-defined date as input and
displays the corresponding day of the week

Software Used:
MATLAB (version R2024b)

Theory

This experiment uses MATLAB to determine the day of the week for a user-provided
date. The program accepts a date in the "dd-MMM-yyyy" format (e.g., "08-Apr-
2025"), processes it using MATLAB's date-handling capabilities, and displays the
corresponding weekday name.

Key steps involved:

1.User Input: 2. The user is prompted to enter a date as a string. The format must
follow the
pattern dd-MMM-yyyy where:
dd = Day (e.g., 08) MMM = 3-letter month
abbreviation (e.g., Apr) yyyy = Year (e.g.,
2025)
3.Conversion to Datetime Object: 4. The datetime() function is used to convert the
string into a date object. The
'InputFormat' ensures MATLAB correctly interprets the input format.
5.Finding the Day:
6. The weekday() function extracts both the day number (1 = Sunday, 2 = Monday,
etc.) and the corresponding day name (e.g., "Tuesday").
7.Error Handling: 8. A try-catch block is used to handle invalid input formats. If the
user enters a date
incorrectly, the program shows a helpful message without crashing.

This method provides a simple and reliable way to determine the day for any given
date using MATLAB's built-in date processing functions.
Code

Output

Precautions-

Ensure the date is entered in the correct format: dd-MMM-yyyy (e.g., 08-Apr-
2025).
Use valid three-letter month abbreviations (e.g., Jan, Feb, Mar, etc.).
Do not enter an invalid date (e.g., 31-Feb-2024), as it will trigger an error.
Be mindful of the case sensitivity in month abbreviations—MATLAB is case-
insensitive by default, but using proper capitalization improves readability.
Make sure to enclose the date input in double quotes if entering it directly in the
code (e.g., "08-Apr-2025").
Experiment-9
Aim
To solve the differential
equation

with the initial condition y(0)=1, and compute the value of y(1.0) using Euler’s
Method with a step size h=0.2
Software/Hardware Used
MATLAB (version R2024b)
Theory Euler’s method is one of the most fundamental and straightforward numerical
methods for solving first-order ordinary differential equations (ODEs). It is particularly
useful when an analytical solution is difficult or impossible to obtain.
In this experiment, we are solving the initial value problem:

This equation represents a first-order ODE where the derivative of y depends on both x
and y values. Euler’s method is derived from the Taylor series expansion, truncated
after the first derivative. It approximates the value of y at a future point using the
slope (i.e., derivative) at the current point.
At each step, we compute the value of y using the Euler formula and update x by adding h.
Euler’s method provides a first-order approximation, which means the accuracy improves with
smaller step sizes. Although not as accurate as higher-order methods (like Runge-Kutta), it is
easy to implement and understand, making it ideal for foundational understanding and quick
calculations.

Code

Output

Precautions

Use the correct initial condition 𝑦(0)=1


Choose an appropriate and consistent step size h=0.2.
Implement the function f(x,y) = x + y accurately.
Update both x and y correctly in each iteration.
Verify that the number of steps matches the required final value of x.
EXPERIMENT-10

AIM - To solve the first-order ordinary differential equation


dy/dx = -y with y(0) = 1 using Euler’s Method in MATLAB and determine the
value of y at x=0.06 with a step size h=0.02.

SOFTWARE USED - MATLAB (version R2024b)

THEORY - Euler's Method is a first-order numerical technique to approximate solutions


of first-order differential equations.

Given: dy/dx = f(x, y), y(x0) = y0

The iterative formula is : y(n+1) = y(n) + h * f(x(n), y(n))

In this experiment:

●​ f(x, y) = -y​

●​ Initial value: y(0) = 1​

●​ Step size: h = 0.02​

●​ Goal: Approximate y(0.06)

MATLAB CODE -
RESULT -

PRECAUTIONS - 1. Ensure the step size h is small enough for a good approximation.​
2. Double-check initial conditions before running the code.​
3. Preallocate arrays in MATLAB for better performance.​
4. Verify that f(x, y) is correctly implemented in the loop.​
5. Ensure number of steps n matches (xf - x0)/h.​
EXPERIMENT 11

AIM : To solve the differential equation


dy/dx = y - x², with y(0.6) = 1.7379
using the Fourth Order Runge-Kutta Method and to compute the value of y at x = 0.8
using MATLAB.

SOFTWARE USED : MATLAB R2023 or later (for scripting and numerical


computation).

THEORY : The Runge-Kutta method of fourth order is a widely used numerical


technique to solve ordinary differential equations of the form:

dy/dx = f(x, y), with initial condition y(x₀) = y₀

The value of y at x = x₀ + h is computed using:

k₁ = h * f(x₀, y₀)​
k₂ = h * f(x₀ + h/2, y₀ + k₁/2)​
k₃ = h * f(x₀ + h/2, y₀ + k₂/2)​
k₄ = h * f(x₀ + h, y₀ + k₃)

Then,​
y(x₀ + h) = y₀ + (1/6) * (k₁ + 2k₂ + 2k₃ + k₄)

This method calculates the slope at multiple points and averages them for higher
accuracy.

MATLAB CODE :
RESULT :

PRECAUTIONS :

1.​ Choose an appropriate step size hhh to ensure accuracy.​


2.​ Ensure the initial condition is correctly implemented.​

3.​ Use a sufficient number of iterations to get the solution for the desired xxx-value.​

4.​ Be careful when implementing the Runge-Kutta method to avoid any errors in the
formula calculations.​

5.​ Always verify the solution by comparing it with an analytical solution, if possible,
or checking the results for consistency.​
EXPERIMENT 12

AIM : Using Runge - Kutta Method solve dy/dx = y-x/y+x where y(0) = 1 and find the
values of y(0.2) taking h = 0.1

SOFTWARE USED : MATLAB

THEORY : The Runge-Kutta 4th Order Method is a numerical method to approximate


the solution of an ordinary differential equation (ODE) of the form:

dy/dx = f(x, y), y(x₀) = y₀

The next value of y is calculated using:

k1 = h * f(x_n, y_n)
k2 = h * f(x_n + h/2, y_n + k1/2)
k3 = h * f(x_n + h/2, y_n + k2/2)
k4 = h * f(x_n + h, y_n + k3)
y_{n+1} = y_n + (1/6) * (k1 + 2k2 + 2k3 + k4)

Here :
dy/dx = (y - x)/(y + x)
y(0) = 1
h = 0.1
Find y(0.2)

MATLAB CODE:
RESULT :

PRECAUTIONS :

●​ Ensure that the differential equation is well-defined and continuous in the given
interval.​

●​ Carefully compute intermediate values (k1 to k4) to avoid calculation errors.​

●​ Use a consistent step size h throughout the computation.​

●​ Round values properly to avoid accumulation of rounding errors.​

You might also like