0% found this document useful (0 votes)
7 views8 pages

Lab 4 Mecanica

The document analyzes harmonic oscillations and their composition through MATLAB simulations. It considers oscillations with coinciding and perpendicular directions, as well as coherent and non-coherent oscillations. Graphs of the composed oscillations are generated for various cases and parameters.

Uploaded by

Adrian Burduja
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)
7 views8 pages

Lab 4 Mecanica

The document analyzes harmonic oscillations and their composition through MATLAB simulations. It considers oscillations with coinciding and perpendicular directions, as well as coherent and non-coherent oscillations. Graphs of the composed oscillations are generated for various cases and parameters.

Uploaded by

Adrian Burduja
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/ 8

Ministry of Education of Republic of Moldova

Technical University of Moldova

Faculty of Computers, Informatics and Microelectronics

Physics Department

Raport
For Theoretical Mechanics made in MATLAB
Laboratory work 4

Variant 5

Compunerea oscilaţiilor armonice

Author: Verified:
Burduja Adrian dr., conf. univ. Sanduleac,
std. gr. FAF-231 Ion

Chis, inău 2023


FAF-231 Burduja Adrian; Laboratory Work №-4 2

I. To do a concise generalization should be made about


the kinematic characteristics of harmonic oscillations
and their composition, when the directions coincide,
and when the directions are mutually perpendicular.

II. Choose two harmonic oscillations of the same di-


rection (x1 and x2), with cyclic frequencies ω1 and ω2,
with initial phases α1 and α2, and amplitudes A1 and
A2. Compose these oscillations (x = x1 + x2, the result-
ing oscillation), constructing respective graphs with
informative inscriptions for the following cases
a) Non-coherent harmonic oscillations (ω1 ̸= ω2 ). Writing the file-function of time, which
would build in a graphical window on common axes graphs of the functions x1 (t) , x2 (t)
and x(t). Analyze the results obtained.
b) Coherent harmonic oscillations (ω1 = ω2 ). Write the file-function time, which would
construct in a graphical window on common axes the graphs of the functions x1 (t) , x2 (t)
and x(t). Analyze the obtained results.

III. The material point takes part in two harmonic os-


cillations of mutually perpendicular directions (x and
y) with cyclic frequencies ω1 and ω2, with initial phases
α1 and α2 and amplitudes A1 and A2. It is necessary
to select these oscillations in the following cases:
a) ω1 = ω2 . Write a file-function with the number of the figure and the difference of
phase(α = α1 − α2 ) as the parameters, which will construct, on different axes, in a
graphical window, the trajectories of motion of the point(Lissajous figures), for
π π π π 2π 3π 5π
α = 0; ; ; ; ; ; ; ; π
6 4 3 2 3 4 6

ω1 n1
b) ω1 ̸= ω2 , ω2
= n2
, n1 , n2 = 1, 2, 3, ..., α1 = α2 = α − π2 ; Write a file-function with the
FAF-231 Burduja Adrian; Laboratory Work №-4 3

number of the figure,parameter α as the parameters, which will construct, on different


axes, in a graphic window, the trajectories of motion of the point(Lissajous figures), for
π π π π 2π 3π 5π
α = 0; ; ; ; ; 3; 4; 6;
6 4 3 2
π.

Code:

# LL4 file
# L . L . Nr4
% Burduja Adrian FAF231

% EX2
t = 0: pi /20:10* pi

%a)
figure (1)
subplot (2 ,2 ,1)
[ x1 , x2 , x ] = fn ( t )
plot (t ,x , ’k - ’ ,t , x1 , ’k - r ’ ,t , x2 , ’k - g ’)
title ( ’ O s c i l a i i ␣ armonice ␣ necoerente ␣ ( 1 ␣ ␣ 2 ) ’) ;
grid on ;
xlabel ( ’t ’) ; ylabel ( ’f ( t ) ’) ;
legend ( ’ fn ’ , ’ x1 ’ , ’ x2 ’)
axis ([0 30 -50 50])

%b)
subplot (2 ,2 ,2)
[ x1 , x2 , x ] = fc ( t )
plot (t ,x , ’k - ’ ,t , x1 , ’k - r ’ ,t , x2 , ’k - g ’)
title ( ’␣ O s c i l a i i ␣ armonice ␣ coerente ␣ ( 1 ␣ = 2 ) ’) ;
grid on ;
xlabel ( ’t ’) ; ylabel ( ’f ( t ) ’) ;
legend ( ’ fn ’ , ’ x1 ’ , ’ x2 ’)
axis ([0 30 -50 50])

%c)
subplot (2 ,1 ,2)
t = 0: pi /20:100* pi
FAF-231 Burduja Adrian; Laboratory Work №-4 4

[ x1 , x2 , x ] = fan ( t )
plot (t ,x , ’k - ’ ,t , x1 , ’k - r ’ ,t , x2 , ’k - g ’)
title ( ’ O s c i l a i i ␣ armonice ␣ necoerente ␣ ( 1 ~= ␣ 2 ␣ ) ’)
grid on ;
xlabel ( ’t ’) ; ylabel ( ’f ( t ) ’) ;
legend ( ’ fn ’ , ’ x1 ’ , ’ x2 ’)
axis ([0 300 -50 50])

%d)
figure (2)
alpha = [0 , pi /6 , pi /4 , pi /3 , pi /2 ,2* pi /3 ,3* pi /4 ,5* pi /6 , pi ]
for n = 1:9
subplot (3 ,3 , n )
t = [0: pi /20:100* pi ]
[ x1 , x2 , x ] = fac (t , alpha ( n ) )
plot (t ,x , ’k - ’ ,t , x1 , ’k - r ’ ,t , x2 , ’k - g ’)
title ( ’ O s c i l a i i ␣ armonice ␣ necoerente ␣ ( 1 ~= ␣ 2 ␣ ) ’)
grid on ;
xlabel ( ’t ’) ; ylabel ( ’f ( t ) ’) ;
legend ( ’ fn ’ , ’ x1 ’ , ’ x2 ’)
axis ([0 300 -50 50])
end

% EX 3
% a)
omega1 (3)

% b)
omega2 (4)

# code of file - function fn :


function [ x1 , x2 , x ] = fn ( t )
x1 = 18* cos ( t )
x2 = 20* cos (2* t )
x = x1 + x2 ;
endfunction

# code of file - function fc :


FAF-231 Burduja Adrian; Laboratory Work №-4 5

function [ x1 , x2 , x ] = fn ( t )
x1 = 18* cos ( t )
x2 = 20 * cos ( t )
x = x1 + x2 ;
endfunction

# code of file - function fan :


function [ x1 , x2 , x ] = fn ( t )
x1 = 18* cos ( t )
x2 = 20 * cos (1.08* t )
x = x1 + x2 ;
endfunction

# code of file - function fac :


function [ x1 , x2 , x ] = fac (t , d_aplha )
x1 = 18 .* cos ( t + 1 + d_aplha )
x2 = 20 .* cos (1.08 .* t + 1)
x = x1 + x2 ;
endfunction

# code of file - function omega1 :


function retval = omega1 ( fign )
figure ( fign )

t = [0:0.05:10]
alpha = [0 , pi /6 , pi /4 , pi /3 , pi /2 ,2* pi /3 , 3* pi /4 , 5* pi /6 , pi ]
for n = 1:9
ax = 0.5
ay = 5
subplot (3 ,3 , n )
x = ax .* cos ( 5 .* t )
y = ay .* cos ( 5 .* t + alpha ( n ) )
plot (x , y )
grid on
title ([ ’ alpha ␣ = ␣ ’ , num2str ( alpha ( n ) ) ])
end
endfunction
FAF-231 Burduja Adrian; Laboratory Work №-4 6

# code of file - function omega2 :


function retval = omega2 ( fign )
figure ( fign )

t = [0:0.05:10]
alpha = [0 , pi /6 , pi /4 , pi /3 , pi /2 ,2* pi /3 , 3* pi /4 , 5* pi /6 , pi ]
for n = 1:9
ax = 0.5
ay = 5
subplot (3 ,3 , n )
x = ax .* cos ( 5 .* t + alpha ( n ) - pi /2)
y = ay .* cos ( ( n +1) *5 .* t + alpha ( n ) - pi /2)
plot (x , y )
grid on
title ([ ’ alpha ␣ = ␣ ’ , num2str ( alpha ( n ) ) , ’␣ n ␣ = ␣ ’ , num2str ( n ) ])
end
endfunction

Obtained figures:
FAF-231 Burduja Adrian; Laboratory Work №-4 7
FAF-231 Burduja Adrian; Laboratory Work №-4 8

Conclusions
In this laboratory I have studied cinematic characteristics of harmonic oscillations and
their composition in different conditions. To visualise them I used octave to write the
scripts that draw them onto the graphic window. Working with these oscillations, in-
putting different values I observed how the image changed.

You might also like