Skip to main content

Questions tagged [matlab]

Use of Matlab to solve engineering problems.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Temperature profile in a pipe flow with Matlab pdepe solver

I’m currently trying to solve the heat equation for the Ohmic heating of a pipe flow using the MATLAB pdepe solver. The problem is described in the following paper: https://doi.org/10.4236/ojmsi.2021....
0 votes
0 answers
15 views

How to implement ESN layers or more generally reservoir computing approach in MATLAB DDPG agent

Is it possible to use echo state neural networks and generally reservoir computing approach as actor and critic networks in MATLAB with DDPG agent? Does MATLAB support this feature? If yes, how to do ...
0 votes
1 answer
93 views

Proposing a Transfer Function from a Response Graph

I need to propose a transfer function from the following graph. The K value (or amplifier gain?) we were given is 2 and it has a step response of 2 as well. When looking at the graph though it looks ...
0 votes
0 answers
11 views

High-level sun sensor modelling for satellite

I am searching for some references on how to model at high level a sensor in terms of the statistical interpretation of the errors (bias, noise, ecc). Do someone have any reference (books or papers) ...
0 votes
2 answers
50 views

Linear and nonlinear model outputs are different using the same input

I'm working on something in nonlinear control, and we want to compare the output of the obtained linear model (state space form using steady state data) w.r.t the nonlinear model. Attached is a ...
0 votes
0 answers
25 views

Designing transfer function compensator to create a stable response

I am working on create a control system to control a satellite to be fixed with respect to a distant start (theoretically). The transfer function of the dynamic model of the system is shown below in ...
0 votes
0 answers
25 views

Autonomous vehicle lateral control

I am working on a control system for autonomous vehicles, i am using a kinematic bicycle model simulated on matlab simulink and the formula i used for the steering angle is given in the figures below ...
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 ...
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 ...
0 votes
1 answer
28 views

Simulating falling and moving wooden house?

In Sweden, a newly constructed 150 m2 wooden residence built atop a mud foundation has exhibited significant structural instability. Over a period of 500 days, the house has settled by 90 millimeters ...
0 votes
1 answer
68 views

Orientation and horizontal position control of a bar in 2D

I have a scenario where I have a bar of 0.1 m in length, 10N weight is applied in the center. Two forces are applied on the bar at both ends vertically, right one if 5.1 N and the left one is at ...
0 votes
1 answer
61 views

Genetic Algorithm (GA) MATLAB

I want to find the point that a two variable function has a maximum using a genetic algorithm in MATLAB. The following code implements my function. The initial function has no minus sign. ...
0 votes
1 answer
447 views

Simulink Treating Discrete-Time State-Space as Continuous-Time?

I have a MATLAB script wherein I take a second-order ODE on $\mathbb{R}^3$ (vector field on the phase space), then, at a critical point, take the Jacobian matrix $A$, use a "fully-actuated" ...
0 votes
1 answer
83 views

"Roll My Own" Integrator Block for Multiple Signals

Is it possible to create a user-defined block in Simulink (and, later, XCos) that accepts a variable number of signals (I anticipate working with mainly 12 signals but not necessarily that number of ...
0 votes
0 answers
25 views

Calculating noise floor level and SNR

I have N samples of a baseband IQ signal that I took from an SDR (Pluto) with a certain fs (BW = fs). How can I accurately calculate the noise floor level of that signal in dBm, SNR in dB and Peak To ...
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, ...
0 votes
0 answers
15 views

81 Level Inverter Problem when using a Motor as a Load (Simulink)

i made a VFD based on (See reference 1). The problem is that, when connecting a Motor (Asyncrhonous Machine SI) as the load... the Noise just goes crazy. First, using an RLC Series Load (Default) i ...
0 votes
0 answers
16 views

Signal processing and modulation in Simulink

I want to add input to my Simulink model from PC / Laptop keyboard. I found a few similar s-functions in which this opportunity is implemented but the problem is that it only shows a discrete "...
0 votes
0 answers
12 views

How to add wireless capability to DC Electric Charging Vehicle Diagram?

I am using this DC EV Charger model as a base for research provided by Mathworks: https://www.mathworks.com/help/sps/ug/dc-fast-charger.html I want to add some wireless receiver/transciever to the ...
0 votes
0 answers
66 views

How to implement H-infinity controller in STM32 platform?

I used matlab to simulate some H infinity controllers, and I have some understanding of the related theory. But I don't know how to implement H-infinite controller on STM32 platform using C/C++ code. ...
0 votes
1 answer
557 views

What is the Z transform of the Discreate PI control model?

I have a discreate PI controller implemented in stm32 MCU, it has the following form: $$ PI=K_p\cdot[r(t_i)-y(t_i)] + (K_I)\cdot\sum_{n=0}^{i}[r(t_n)-y(t_n)]\cdot\Delta t $$ where $r(t_i)$ is the ...
0 votes
0 answers
30 views

Is a vibrating Euler beam supposed to behave in this way?

I am a student of mathematics and for my modelling seminar, I need to dip a little bit into engineering in order to model the movements of a suspension bridge under influence of wind. This will be ...
0 votes
0 answers
37 views

steering wheel angle control

I am working on an autonomous vehicle's control, specifically the steering wheel angle control. Knowing that I used kinematic bicycle model, my questions are: How do I choose the actuator for my ...
0 votes
1 answer
134 views

MATLAB allmargin() function return multiple GainMargin, but how to identify them on the Bode plot?

I have a high order discrete transfer function model which has the following form. When I use the allmargin function to get the gain margin, I get the following result: ...
0 votes
1 answer
76 views

What is the effect of the resonant frequency of the system function Porter diagram on the stability of the system and how to analyze it?

I am a novice in automatic control, the theoretical basis is not very good. We have a large electric clamping jaw, single degree of freedom, the motor is controlled by the torque output, the motor has ...
0 votes
1 answer
411 views

How to Use a parameter in Matlab Simulink?

I want to include a parameter in Simulink. For example, like the block in the picture. How to use a parameter in the gain and get the output which is L*(input), which 'L' is only a parameter, like '...
0 votes
0 answers
79 views

Simulink models comparison issue

I'm comparing two simulink models and in the report i'm getting the following difference. I don't really figure out what that difference is. Any idea is appreciated
-1 votes
2 answers
114 views

How to Determine a Valid Relationship Equation Between Two Finite Datasets -- Python, Matlab or Other [closed]

I struggled to find a clear solution online so I'm resorting to asking a fresh question. I have two finite datasets (call them 40x1 vectors) that are equal in length and generate non-linear curves, ...
0 votes
0 answers
54 views

What is the solutions of the following 1D diffusion equality using Crank–Nicolson method?

Through my research I faced to the following equality and need to find $c_i^{t+1}$. Moreover, I found that it can be solved by Crank–Nicolson method (see here: https://en.wikipedia.org/wiki/Crank%...
0 votes
0 answers
74 views

Structured trianglar finite element mesh in MATALB

The available triangular mesh in the MATLAB PDE tool box here gives an unstructured triangular mesh. How can I get a structured triangular mesh from the tool box with a similar data structure [p,e,t]. ...
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 ...
0 votes
1 answer
69 views

Extraction Flash Calculation - 4 Component and 2 Phase System

I am performing extraction flash calculations for 4 component and 2 phase system in Matlab. For anyone somewhat shaky with what extraction flash calculation is; extraction is performed, feed ...
0 votes
2 answers
393 views

Modeling a second order system in time and frequency domain

For school I was asked to model the transfer function $H(s)=\frac{3}{(s+4)(s+5)}$ in both the time and frequency domains using initial conditions $y(0)=2,y'(0)=3$, a step input, and Simulink. I would ...
0 votes
0 answers
107 views

Double Summation of Matrices in Convex Optimization in CVX

I want to implement the following optimization problem from the following paper Randomized Gossip Algorithms, Page 10 Eq. 53\ 1- In this problem, $W$, $P$, and $P_{ij}$ are $n\times{n}$ matrices. I ...
0 votes
1 answer
3k views

Design of a lead compensator with root locus in matlab

For the transfer function $G(s)$, I tried to design a lead compensator for the function to have a response to the step with the following specifications: $$\%OS = 10\% \ \rightarrow \ Overshoot $$ $$ ...
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 ...
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^\...
0 votes
1 answer
65 views

Unstable System. Error Trying to model the Red Bull Stratosphere Free Fall

I tried to model a problem months ago and still I can't solve, I don't want forget this problem so I would like to share what I tried and if you know what is happening with my graph. This is the ...
0 votes
1 answer
216 views

Why matlab returns a damp ratio as 1 for a over damped system?

I have a second order system with the transfer function as: "1/(s^2 + 5.45s + 1)", I thought it should be an over-damped system, but when I use the damp function in MatLab, it returns the ...
0 votes
1 answer
688 views

Reject Negative Input Simulink

Note: The design is implemented in Simulink. Suppose I have a system wherein I am computing the sum of errors per discrete time interval. Now, I only want to consider positive errors to be summed up ...
0 votes
0 answers
118 views

How do I find the gain from the root locus with given perfomance, where I know the real part of the poles?

I have an exercise to draw a root locus plot and determine its gain to make sure that it fulfills the performance requirements. the given system G(s) is $$G(s) = \frac{1}{s^2+s}$$ And the given ...
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/...
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 ...
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 ...
0 votes
1 answer
2k views

Pole placement with damping ratio and natural frequency

how can I find out the poles of a system if I have the damping ratio $ ζ = 0.707$ and the natural frequency $ω_n = 2.3\text{ rad/sec}$? $A = \begin{bmatrix} -0.02 & 0.1 & 0 & -9.81 \\ -0....
0 votes
0 answers
33 views

Process disturbance in PI controller help

This is the project i'm working on and i'm struggling to understand one sentence which is stopping me from progressing the project. I'm struggling to understand what it means when it says to add +/- ...
0 votes
0 answers
49 views

Mixed Sensitivity Problem

I have plant, $$P(s) = \frac{1-s/5}{(s^2 + s/4 +1/4)}$$ I am taking a mixed sensitivity approach for that I have chosen $V$,$W_1$ and $W_2$ as follows: For bandwidth, $\omega$ =1 so I chose M as, $M = ...
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/...
0 votes
1 answer
74 views

How I can separate a matrix into two matrices in Matlab?

I want to separate into two matrices in Matlab like this: $$ Q=Sq^{T}Sq $$ for example this matrix: $$ Q=\Biggm[\matrix{92.316 &31.78&240.417\cr 31.78 &194.66 &275.47\cr 240.417 &...
0 votes
1 answer
132 views

Optimization with GA (genetic algorithm)

I want to optimize the below function with GA(genetic algorithm): $$ \min_{l_{x_1},l_{x_2},l_d}||S_QS(z)||_2 $$ $S_Q$ and S(z) are defined as: $$ S_Q=\Biggm[\matrix{6.6549 &-0.806&6.883\cr -0....