Borrar filtros
Borrar filtros

Varying weight of a ball with time in a Maglev system

7 visualizaciones (últimos 30 días)
Tyler Mudge
Tyler Mudge el 12 de Dic. de 2020
Comentada: Sam Chak el 10 de Jul. de 2024 a las 19:28
Hello, I'm trying to vary the weight of a magnetically levitated ball with time. Namely, the balls weight is supposed to suddenly chand at time t=20s by 15%. Here is the code I have so far including the initial mass of the ball (0.06 kg):
clc
clear
%% Define knowns
g = 9.81; % gravity [m/s^2]
k = 1.32435*10^-4; % Magnet force constant, [N/amp]
x_0 = 0.015; % steady state position [m]
m_0 = 0.06; % initial ball's weight [kg]
i_0 = 1; % Steady state amps, assumed from NYU experiment [amp]
%% Define variable parameters
i = 1;
R = 10; % From NYU experiment [Ohm]
L = 0.4125; % Inductance from NYU experiment [Henry]
%% Checking Current System Stability
a = (2*k*i_0)/(m_0*x_0^2); % num of TF
b = (2*k*i_0^2)/(m_0*x_0^3); % part of den for TF
num = [a];
den = [1 0 b];
sys = tf(num,den)
% step(sys,t)
%% Simulate Model
maglev_sim = sim('Maglev_Model.slx');
%% Plotting m = 0.06 kg response
figure(1)
plot(maglev_sim.maglev,'LineWidth',2)
title('Position Response for m = 0.06kg')
ylabel('Position (m)')
xlabel('Time (s)')
%% Changing mass with time
The Simulink model is attached. So far I have been able to achieve the desired output of the ball's position being 0.015 m away with the original mass of 0.06 kg but now I need to change the mass with time and have the system still keep the ball at that position.
Any help is appreciated!
  2 comentarios
Gebretsadkan Fissha
Gebretsadkan Fissha el 10 de Jul. de 2024 a las 18:54
Hello, can you help me for solving sliding mode controller nonlinear odes of Maglev system?
Sam Chak
Sam Chak el 10 de Jul. de 2024 a las 19:28
Suggest you to post a new question (click on the ASK button) and show the nonlinear ODEs of the Maglev system.

Iniciar sesión para comentar.

Respuestas (1)

Kyle Rawding
Kyle Rawding el 17 de Mzo. de 2021
Hi -
It sounds like you're interested in updating your transfer function as the simulation runs to account for the changing mass, rather than defining static 'a' and 'b' constants.
I'd recommend taking a look at the accepted answer to this question:
Hope that helps!
-Kyle

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by