Answered
Plot step response for control signal (u1 u2 ...) in a MIMO system with feedback
Hi @Cesar Adolfo Cruz Vargaya The original plant is a coupled 2nd-order MIMO system. If the desired closed-loop transfer functi...

3 years ago | 1

Answered
PID implementation using code
Hi @Sanjeet Kulkarni Wouldn't it be simpler if you obtain the signal directly from the Integrator block, and then feed it into...

3 years ago | 0

Answered
Optimizing simulink parameters from matlab code
Hi @Jasmin Falconer Put it another way around, you can fminunc() to directly optimize the gains from the Simulink model and th...

3 years ago | 0

Answered
conversion from fmincom to NSGA -II
Hi @basit mujtaba If you have written your own NSGA-II algorithm in a MALTAB function file, for example, called nsga2.m, then y...

3 years ago | 0

Answered
Find likelihood from state space with Kalman filter
Hi @Rob Perhaps you are looking for the likelihood() function. help likelihood

3 years ago | 1

| accepted

Answered
Driving force of driven damped harmonic oscillator missing
Hi @Jerry Yeung Basically, there is nothing wrong with your original code. The reason that the spring response is not affected ...

3 years ago | 1

| accepted

Answered
I need cost function for tuning PID controller help me
Hi @Yazeed Ali Not sure what your system is, but I think you can try the one of the simplest cost function probably looks like ...

3 years ago | 0

Answered
nonlinear variable state space observer pole placement
Hi @Bernd Pfeifer Long time I didn't solve math puzzles like this one. Generally, you should be able find the analytical soluti...

3 years ago | 3

Answered
finding the distance between two points
Hi @Natali Petani You can try the function: pdist2(). https://www.mathworks.com/help/stats/pdist2.html help pdist2

3 years ago | 0

Answered
Input Signal from state space model
Hi @Justin You can try using the lsim() function. Search Google/Documentation for details. Example is shown below: A = [ 0 ...

3 years ago | 0

Answered
My Simulink Model takes hours to complete 1 second, and I need to run it for 5,000 second. I tried to change the minimum time step, but Matlab keeps giving erros when I do so.
Hi @janna roberts The typical satellite attitude dynamics are not stiff. You can try, but I think changing it to a stiff solver...

3 years ago | 0

Answered
How to verify if my system (Z-domain) is stable in MATLAB
Hi @Rafael Most probably because you did a "positive feedback". Try do this impulse(feedback(K*TF, 1)) instead of impulse(f...

3 years ago | 0

Answered
How to make the linear function
Aha, I see... If you want to get rid of spikes and want a smooth transition, but not strictly linear, then you can consider addi...

3 years ago | 1

Answered
Creating custom Transfer Function with more learnable parameters
*Edit*: This article contains information about creating custom functions for NN. https://www.mathworks.com/help/deeplearnin...

3 years ago | 0

Answered
What algorithm to use for collision avoidance of a robot?
Hi @Farzad Torabi I'm unsure. Maybe you intend to tell the robot to "back down" or retract the arm? Conventionally, RRT is an ...

3 years ago | 3

| accepted

Answered
PID for fixed distance
Hi @Andrea Tonelli I think your control design part is okay. But the divergence issue is probably related to the way you setup ...

3 years ago | 0

Answered
Why does matlab plot the unit step like a straight line?
Hi @Mark S System 1: s = tf('s'); sys1 = 1/s; % integrator system step(sys1) System 2: sys2 = zpk([], [...

3 years ago | 2

| accepted

Answered
Minimization of cost function on MPC
Hi @Chandrakanth Pavanaskar You have a system model sys and I presume that you have written your own code for the ODE_solver to...

3 years ago | 0

Answered
How can i get smooth sine wave in MATLAB R2020b with any frequency.
Hi @Rohit To get a smooth sine wave, you are suggested to use this Sine Wave Function block: https://www.mathworks.com/help/...

3 years ago | 0

Answered
Implement these expressions in OCTAVE and plot on the same figure, the two functions: f=3t2 +2t-0.5 , g=2t cos(t) where the variable t varies from 0 to 10 with step 0.5.
@Jignasa, I typed exactly the same equations as you knowingly put on the description. But it gives error. Please check if the...

3 years ago | 0

Answered
PID Tune: Plant cannot be linearized
Hi @Arash Most likely your PV system has components that contain discontinuities. Thus, the Plant cannot be linearized. Howeve...

3 years ago | 1

| accepted

Answered
State-Space Matrices
Hi @Aysel Alimirzayeva I added a simple example to show you. If you like this example, consider voting 👍 the Answer. Thanks! S...

3 years ago | 2

Answered
Plot step response of transfer function
Hi @Ye Ken Kok It is a input-output difference equation. Thus, you cannot use the continuous-time Laplace transform. Since the...

3 years ago | 1

Answered
tuning PID controller in simulink with actual hardware equipments
Hi @aakash dewangan If the transfer function is unknown, and the system is relatively simple, perhap the model-free extremum-se...

3 years ago | 1

| accepted

Answered
Help with formulating conditional logic.
Hi @Jeffrey Lewis There are a few ways to do it. But since you have written the data into the code, I think probably the simple...

3 years ago | 1

| accepted

Answered
State-Space Matrices
Hi @Aysel Alimirzayeva It's because of negative feedback. The LQR function only computes . Making a substitution

3 years ago | 2

| accepted

Answered
runge kutta for 2 order ODE
Hi @Rio Bratasena Assuming that the symbol is the Dirac impulse. please check if the following responses are expected wh...

3 years ago | 0

Answered
Calculating system bandwidth using Function "bandwidth"
Hi @Alireza Aghdaei The function can distinguish from the input type. One requires a Dynamic System Model, the other requires a...

3 years ago | 1

| accepted

Answered
how does matlab simulate electric field
Hi @abdullah Typically, the quiver() function can be used. You can also find a very good example on the simulation of Electri...

3 years ago | 3

Answered
Solve system of equations graphically
Alternatively, you can also do like this: Solve or plot this polynomial: x = -2:0.01:2; y = x.^4 - 6; plot(x, y), gr...

3 years ago | 0

Load more