Skip to main content

Questions tagged [matlab]

Use of Matlab to solve engineering problems.

Filter by
Sorted by
Tagged with
6 votes
1 answer
972 views

mass calculation from transfer function or bodeplot

I have a double mass rotary model. The two masses are connected by an axis which together acts as a spring damper system of the fourth order. The system is actuated by a motor and the angle of ...
Somanna Thapanda's user avatar
6 votes
1 answer
198 views

Programmable parameter change of Pro/E simulation by using Excel VBA , Matlab, Labview or Pro/E own function

Now, I've been conducting beam simulation by using Pro/E. I would like to change payload(force) of beam step by step, and then plot the relation between deflection and payload(load range : 50kg to ...
KKS's user avatar
  • 354
5 votes
1 answer
168 views

dSPACE compiler linker error -- fscanf undefined

I'm dealing with a somewhat intractable problem. We're running dSPACE 7.4 (RTI 1006) on MATLAB 2011a, which I understand uses the dSPACE DS1006 C Compiler v. 2.2. When I try to compile one of our ...
ZStamler's user avatar
4 votes
2 answers
853 views

Finding coefficients for a PID controller that minimize the integral of the squared error (ISE)

The problem The problem is to find the coefficients for the P, I and D terms of a PID controller used to regulate the object that minimize the the integral of the squared error (ISE): $$Q = \int_0^\...
user24139's user avatar
4 votes
1 answer
171 views

How to design the right input to obtain a desired output for a linear system?

If I have a state-space model, so that matrices $A$, $B$, $C$ and $D$ are known, how can I design the right input $u$, so that $y$ is a desired signal, say, a sine wave with constant amplitude? $$\...
Alessandro's user avatar
4 votes
1 answer
854 views

Is it normal to get different solutions with different ODE methods in MATLAB simulink?

I made a block diagram using simulink. When I solve it with ode45 and ode23 it gives me different graphs. Is it normal? Should I use the proper one? ...
Deccoyi's user avatar
  • 41
4 votes
1 answer
171 views

Convolution with RTD laminar flow

I have laminar flow in a tube. Consider the tube to be 0.2 m long and with an average velocity of 0.05 m/s. The analytical expression for my transfer function is: $E(t)= \frac{\tau^2}{2*t^3}$ for $t$>=...
Gesetzt's user avatar
  • 93
3 votes
1 answer
72 views

Problem with performances of a control scheme

I am trying to prove with Matlab that if I have an improper system and I place poles at higher and higher frequencies the performances of the system improves. In particular I am considering the ...
J.D.'s user avatar
  • 225
3 votes
1 answer
5k views

What are the Singular Values of a dynamic system and how are they calculated in the *sigma* function in Matlab?

According to Matlab documentation: sigma plots the singular values of the frequency response of a dynamic system. bode creates a Bode plot of the frequency response of a dynamic system. I am ...
Joe's user avatar
  • 31
3 votes
1 answer
665 views

How do I create a graph of the phase angle and response of a harmonic excitation in Matlab?

In my course of dynamics of structures, I am struggling with some basic principles. As a practice, I am plotting (or attempting to plot) the curves that are shown in the course book, with the help of ...
Beunhaas's user avatar
3 votes
0 answers
132 views

Mathematical transformation of a heading angle to a roll angle

I'm trying to understand a function in a SIMULINK example of a path following UAV simulation. The gist is that, the UAV Waypoint Follower block provides a required heading from a list of waypoints and ...
Chryron's user avatar
  • 141
3 votes
0 answers
110 views

LQR Implementation in MATLAB

I am trying to implement a simple LQR controller in MATLAB for a purely deterministic system. The code is shown below: ...
Josh Pilipovsky's user avatar
3 votes
0 answers
368 views

3 DOF SISO state space control

As part of a control systems course I have to implement control for a 3 DOF SISO mass spring damper model of a robotic cutter arm. The arm is to follow a 5Hz triangle wave reference which is ...
Hieronymus Blois's user avatar
3 votes
0 answers
75 views

How to solve LMIs with equality constraints using MATLAB?

I would like to find n by n matrices P and Q that minimize J = norm(P) + w*norm(Q), where w is a given weight, subject to P>=0, Q>=0, and f(P,Q)=0, where f(P,Q)=0 is a given function of P and R. I ...
David's user avatar
  • 31
2 votes
1 answer
1k views

Nyquist plot - what is the meaning of circles with dB values on complex plane

Let's start with arbitrary transfer function as an example, such as: obj = tf([1 2],[1 0 2 5]); nyquist(obj); grid on; axis([-2 2 -2 2]); axis equal As far as I ...
Maverick's user avatar
  • 125
2 votes
1 answer
1k views

Design op-amp circuit from transfer function? [closed]

What is the best way to design a circuit based on the following transfer function: (0.0364*s)/(0.0002*s + 1) ? I am trying to design the derivative stage of a PIDF controller using op-amps EDIT: This ...
Shivalnu's user avatar
2 votes
1 answer
1k views

How to import a CATIA assembly into SimMechanics

I need to import an assembly from CATIA into SimMechanics but in CATIA, the .stl file format is available only for part files and not for assembly files. How can I do this? Is it possible to convert ...
Kanaga Senthil Raja's user avatar
2 votes
1 answer
1k views

Question on sketching nyquist plot of transfer function with poles on imaginary axis

I have encountered some issues with sketching the nyquist plot for the following loop transfer function: $L(s) = \frac{25K}{S^2+25}$ I know that you first take: $L(\omega=0) = K$ $L(\omega = ...
John's user avatar
  • 251
2 votes
1 answer
214 views

Active suspension with accelerometers and displacement observer/estimator problem

I faced a logical dilemma, while designing and simulating Active suspension system. This is what I have planned: My system will be controlling actuators of a vehicle, using PI. It is 2nd order ...
Aurimas's user avatar
  • 21
2 votes
1 answer
1k views

How to use lsim in matlab for a closed loop system

I have designed a system using a minimum realization. I have the A, B, C matrices and I have assigned closed loop poles for the system. I used the place command to find my K matrix. I am wondering ...
DarkLink's user avatar
  • 123
2 votes
0 answers
41 views

Discretise this transport equation

I am trying to discretise the PDE: $$\phi \frac{\partial c}{\partial t}+\frac{\partial j}{\partial x}=0$$ where $c$ is a function of $x$ and $t$, and $j=qc-D(q)\frac{\partial c}{\partial x}$, $q$ is ...
Vincent Tang's user avatar
2 votes
0 answers
65 views

calculate output $y(t)$ from $Y(z)$ having discrete closed loop model with sine input - residue method

I have closed loop - discrete model. This is how it looks in matlab: I need to compute analitically output $y(t)$ (same as in the Matlab's scope) having $Y(z)$. Where $Y(z)=U(z)*G(z)$ Input is sine ...
mdkdy's user avatar
  • 121
2 votes
0 answers
699 views

Export simulink sdi dataset from MATLAB 2015b

I have used the Simulation Data Inspector in Simulink to log a dataset of two time varying signals. The only option I see concerning exporting is to .mat or to workspace, which basically produce the ...
fluxmodel's user avatar
  • 121
1 vote
2 answers
95 views

How do I interpret states in the MATLAB System Identification Toolbox?

I am using the MATLAB System Identification Toolbox to estimate a 3rd order state space plant model. More precisely, the plant is a car with an Arduino mounted on it. The car takes in a PWM duty cycle ...
mhdadk's user avatar
  • 176
1 vote
1 answer
561 views

Root Locus and Routh–Hurwitz stability criterion

A satellite launcher has a unit feedback system, whose TF global open loop is given by: $$G_c(s)G(s) = \frac{K(s^2-4s+18)(s+2)}{(s^2-2)(s+12)} $$ a) Draw the root locus for this function b) ...
Alessandro Melo's user avatar
1 vote
2 answers
1k views

Calculating a derivative in a loop?

I am not sure where else to post this, so here goes. I have a velocity profile ($v_{\phi}$) for a radial distance ($r$). From this velocity profile I am trying calculate the shear rate ($y$) which ...
dr_j_doe's user avatar
1 vote
2 answers
81 views

Fault Recovery of a UAV using MATLAB

I'm currently investigating fault recovery in a UAV using MATLAB. I've been given several variables: phi = the roll angle psi = the yaw/heading angle beta = the side slip p = roll rate r = yaw/...
gunter's user avatar
  • 321
1 vote
2 answers
127 views

Analizing Vibrations Influence on Dynamic Weighing

I have a very sensitive scale used for dynamic weighing (by dynamic I mean that the scale and load cells are actually beneath a belt conveyor that actively weight product when it´s being transported ...
spe4ker's user avatar
  • 409
1 vote
1 answer
908 views

Model Reduction - Export matrices from ANSYS to MATLAB

I am trying to reduce my model in ANSYS using Craig-Bampton Method. My ultimate goal is to read system matrices, stiffness, damping and mass matrix with MATLAB. The size of stiffness matrix that I ...
breza's user avatar
  • 11
1 vote
1 answer
1k views

Closed loop response of a discrete system

I have trasfer functions of a plant and a controller in laplace domain. I checked for the closed loop response by applying a step response. The system is found to be stable. I checked the response ...
Somanna Thapanda's user avatar
1 vote
1 answer
134 views

simulation of an attitude optimal Backstepping controller based quaternion for a UAV in MATLAB

I'am trying to implement this open access research article Attitude Optimal Backstepping Controller Based Quaternion for a UAV I did not find the same result in this paper Can anyone tell me where my ...
James Dilaw's user avatar
1 vote
2 answers
3k views

How to generate a NACA 6-Series Airfoil analytically?

I asked this question over at Aviation.stackexchange but after that I figured it might be better to place it here. Especially since there were really good answers on the NACA 5-digit-Series airfoil ...
rul30's user avatar
  • 1,192
1 vote
1 answer
84 views

Unachievable motions because of singular Jacobian

This is the Jacobian of a robot arm (IBB IRB 120) with already specified joint angles (0,0,0,0,0,0). This Jacobian is singular for this configuration. ...
jkf's user avatar
  • 147
1 vote
1 answer
72 views

Optimizing Launch to LEO

I recently decided I would try to develop my own launch to LEO optimizer, as I have always been fascinated with the complexity of that problem. I have been using matlab, as I am very comfortable with ...
Frank's user avatar
  • 11
1 vote
0 answers
350 views

Errors obtained in the numerical solution of the 1D convection-diffusion equation

I have been trying to solve the 1D convection-diffusion equation In implementing the above, I have tried to follow closely the method described here: https://uk.mathworks.com/support/search.html/...
gary105's user avatar
  • 23
1 vote
0 answers
30 views

Slow integration of system ODE under specific conditions in adsorption problem

I am trying to solve the system of ODEs below. I am applying the finite differences to z, so I get a system of ODE that I can solve with a solver like ode45. The problem is that under the conditions ...
Synergix's user avatar
1 vote
1 answer
521 views

How to calculate initial concentration of first-order reaction in CSTR?

(This question comes from a Chemical Engineering background, but basic Math and Programming knowledge is also required. I hope it still falls in the scope of engineering.stackexchange.com If not, ...
winkmal's user avatar
  • 111
1 vote
0 answers
11 views

how to implement an encoder in matlab

How can I encode a quantized vector in matlab ? This is a part of a problem where I am asked to implement a communication block using matlab.
user23713's user avatar
1 vote
0 answers
22 views

Unexpected Closed-Loop System Response of Longitudinal Aircraft Dynamics

I have a closed-loop system that represents the longitudinal dynamics of an aircraft with states x velocity, z velocity, pitch rate, pitch, and x and z inertial positions. The outputs of the system (...
ian.cooke's user avatar
1 vote
0 answers
42 views

How can I measure the impact of noise on a FFT?

Please, I have to solve a problem and I really need some help. I have to give an efficient method to consider a maximum amplitude as a starting point to consider as noise the whole spectrum below ...
André Rocha's user avatar
1 vote
1 answer
158 views

Stabilization of telescope on gimbal using data from encoders and gyroscope

I'm designing a control system for a balloon-borne telescope experiment. As the balloon is constantly moving and the gondola is rotating, I want to stabilize the telescope which can be controlled in 3 ...
asmialek's user avatar
1 vote
0 answers
326 views

Designing a PID Controller for Satellite Control

As an Aerospace Engineering Student, I have been trying to make a project of a PID Controller to control the attitude response of a satellite using the parameters from a project called Kufasat. The ...
user3081005's user avatar
1 vote
0 answers
163 views

Method to simulate a dipole antenna in salt water?

I am looking to simulate the radiation pattern of a 2.7Ghz half-wavelength dipole antenna immersed in salt water. I've been using Altair FEKO software to try and accomplish this. I've tried two ...
Scott Hall's user avatar
1 vote
0 answers
97 views

Maintaining constant speed of a CVT engine during a slope

I am not sure if this question is related to this community. But nevertheless. I work on CVT engines, I had a new idea of modifying my controller during a slope or a gradient on the road so that the ...
user5603723's user avatar
1 vote
1 answer
60 views

classify ECG signal using neural network

I am looking to classify ECG signal using with neural network. I have never done signal analysis before. From the samples of data I have, I have noramlised, transformed using the FFT , get the pics, ...
Camus's user avatar
  • 113
1 vote
0 answers
71 views

Temperature distribution

First of all I am just a starter in Matlab, so the program is not optimized. For now I just want to get it running. This is a 3D heat problem with boundary conditions. Fixed temperature from the north,...
Rachid Brah's user avatar
1 vote
0 answers
45 views

Simulink analysis of data parallel to generation

I would like to simulate the following scenario with Simulink/Matlab(/Stateflow): A random number generator is running. Every 10 seconds the numbers that were generated during the last 10 seconds are ...
ec-m's user avatar
  • 111
1 vote
0 answers
26 views

Linear Guidance law into X-Y axis

Im currently writing a model for a guidance law named Maintaining Guidance law. The law looks as following: $$ a_{M} = [K_1,K_2]*[\dot{\lambda_T} ,\dot{\lambda_D}]'$$ Since im using a linear model I ...
Ben's user avatar
  • 121
0 votes
2 answers
372 views

Do I need a feedback loop while testing PID controller?

This is a homework for my university course control theory. The task is simple: Test the P, the I and the D controllers separately to see the effect. We don't have to connect the controllers to a ...
Sam B's user avatar
  • 334
0 votes
1 answer
1k views

How to find closed loop transfer function and use it to identify τ and k?

I have to answer a few questions on transfer functions using Matlab. The first question, which I solved without Matlab, gives a time response graph for an LR circuit, and asks me to find the first ...
Sam's user avatar
  • 11