Risposto

My simulation is showing very small time not the total time period. Can anyone suggest the solution

In the setting of the scope (the gear symbol on the left top corner), there is a 'history' tab. In there remove the tick from 'L...

My simulation is showing very small time not the total time period. Can anyone suggest the solution

In the setting of the scope (the gear symbol on the left top corner), there is a 'history' tab. In there remove the tick from 'L...

oltre 5 anni fa | 0

| accettato

Risposto

How to change load(resistance) while simulation is running

The easiest way is to use the switch block. You can either use simulation time to determine when to switch or define some condit...

How to change load(resistance) while simulation is running

The easiest way is to use the switch block. You can either use simulation time to determine when to switch or define some condit...

oltre 5 anni fa | 0

| accettato

Risposto

bode plot from mass, stiffness and damping matrix

First of all, I think your M K and D matrices are not for a spring mass damper system. They do not have any negative elements in...

bode plot from mass, stiffness and damping matrix

First of all, I think your M K and D matrices are not for a spring mass damper system. They do not have any negative elements in...

oltre 5 anni fa | 2

| accettato

Risposto

What is the purpose of Gmin and Gmax value in Hinfinty controller

From the function page you can find the information you need. I am pasting it here for convenience. --------------- Performanc...

What is the purpose of Gmin and Gmax value in Hinfinty controller

From the function page you can find the information you need. I am pasting it here for convenience. --------------- Performanc...

oltre 5 anni fa | 0

Risposto

how to simulate an impusles response of a transfer function?

An impulse signal is a signal that has a certain magnitude that is applied for a small time. So you can use transfer function bl...

how to simulate an impusles response of a transfer function?

An impulse signal is a signal that has a certain magnitude that is applied for a small time. So you can use transfer function bl...

oltre 5 anni fa | 1

Risposto

How to realize a multiloop system in matlab?

Find below a simple example; A = rand(3); % random system A matrix B = rand(3,2); % random input B matrix C = eye(3); %...

How to realize a multiloop system in matlab?

Find below a simple example; A = rand(3); % random system A matrix B = rand(3,2); % random input B matrix C = eye(3); %...

oltre 5 anni fa | 0

Risposto

For loop for fibonacci series

In case of series, it is better to store each value. Please see below code that generatesa fibonacci sequence, and stores all th...

For loop for fibonacci series

In case of series, it is better to store each value. Please see below code that generatesa fibonacci sequence, and stores all th...

oltre 5 anni fa | 4

| accettato

Risposto

ODE function does not seem to work

First error is in sdof function. There should be a semicolon after c=1 and before m=3; k=3; c=1; m=3; Second error is in yo...

ODE function does not seem to work

First error is in sdof function. There should be a semicolon after c=1 and before m=3; k=3; c=1; m=3; Second error is in yo...

oltre 5 anni fa | 0

Risposto

How can I design a PID Controller to stabllize the plant 1/(s^3+1) ? [beginner]

So you have a transfer function G(s) = 1/(s^3+1) and you want to find gains P,I,D for your controller K(s) = P+D*s+I/s. As commo...

How can I design a PID Controller to stabllize the plant 1/(s^3+1) ? [beginner]

So you have a transfer function G(s) = 1/(s^3+1) and you want to find gains P,I,D for your controller K(s) = P+D*s+I/s. As commo...

oltre 5 anni fa | 2

| accettato

Risposto

MIMO ss2tf, how do I apply it to a 3x3 system?

You can try using just tf (if you are using one of the newer versions of Matlab) sys = ss(rand(6),rand(6,3),rand(3,6),0); %...

MIMO ss2tf, how do I apply it to a 3x3 system?

You can try using just tf (if you are using one of the newer versions of Matlab) sys = ss(rand(6),rand(6,3),rand(3,6),0); %...

oltre 5 anni fa | 0

Risposto

Plotting circle using angle and radius

Next time, share your code so that we can debug your code. My guess is you angle are from +90 degrees to -90 degrees instead of ...

Plotting circle using angle and radius

Next time, share your code so that we can debug your code. My guess is you angle are from +90 degrees to -90 degrees instead of ...

oltre 5 anni fa | 0

Risposto

Forced step response of a signal

I recommend you look into <https://www.mathworks.com/help/control/ref/lsim.html lsim()> function, which is a lot more flexible t...

Forced step response of a signal

I recommend you look into <https://www.mathworks.com/help/control/ref/lsim.html lsim()> function, which is a lot more flexible t...

oltre 5 anni fa | 0

| accettato

Risposto

Index exceeds number of array elements (1)?

You only define V2(1) in your code and do not increase the size of the V2 variable. So I think you are missing a code in your fo...

Index exceeds number of array elements (1)?

You only define V2(1) in your code and do not increase the size of the V2 variable. So I think you are missing a code in your fo...

oltre 5 anni fa | 0

| accettato

Risposto

How to subplot data in a given order?

Below modification will make the subplot in the order presented in the ch_order variable. ch_order = [6 4 2 1 3 5]; fo...

How to subplot data in a given order?

Below modification will make the subplot in the order presented in the ch_order variable. ch_order = [6 4 2 1 3 5]; fo...

oltre 5 anni fa | 0

| accettato

Risposto

how can i find Open loop Transfer Function from Closed loop Transfer Function

From the basics of control theory you should know that for a given system G(s), the closed loop transfer function with unity fe...

how can i find Open loop Transfer Function from Closed loop Transfer Function

From the basics of control theory you should know that for a given system G(s), the closed loop transfer function with unity fe...

oltre 5 anni fa | 4

Risposto

Steady state doesn't appear in step response plot

The bad_sys works if you call the step function with; step(minreal(bad_sys/(1+bad_sys))) I am not sure about the exact r...

Steady state doesn't appear in step response plot

The bad_sys works if you call the step function with; step(minreal(bad_sys/(1+bad_sys))) I am not sure about the exact r...

oltre 5 anni fa | 0

| accettato

Risposto

Saving output of for loop in array

There are some mistakes and unclear parts in your code. However, using your code, you can save it as; Pload = linspace (1,2...

Saving output of for loop in array

There are some mistakes and unclear parts in your code. However, using your code, you can save it as; Pload = linspace (1,2...

oltre 5 anni fa | 0

Risposto

Find the frequency at maximum value in pwelch function

You can obtain the frequency and power vectors from pwelch function. Example; fs = 1e3; t = 0:1/fs:1-1/fs; x = sin(2*...

Find the frequency at maximum value in pwelch function

You can obtain the frequency and power vectors from pwelch function. Example; fs = 1e3; t = 0:1/fs:1-1/fs; x = sin(2*...

oltre 5 anni fa | 0

Risposto

plot for x^2+y^2==3*x*y^2, x^3-x^2==y^2-y in matlab

syms x y real eq1 = x^2+y^2==3*x*y^2; eq2 = x^3-x^2==y^2-y; figure(1) ezplot(eq1) figure(2) ezplot(eq2) ...

plot for x^2+y^2==3*x*y^2, x^3-x^2==y^2-y in matlab

syms x y real eq1 = x^2+y^2==3*x*y^2; eq2 = x^3-x^2==y^2-y; figure(1) ezplot(eq1) figure(2) ezplot(eq2) ...

oltre 5 anni fa | 1

Risposto

Plotting FFT of several data sets (signals) of same length, in the same graph

y = [] just makes y an empty matrix. It is not a necessary code. I include it in the off chance that you had a variable named y ...

Plotting FFT of several data sets (signals) of same length, in the same graph

y = [] just makes y an empty matrix. It is not a necessary code. I include it in the off chance that you had a variable named y ...

oltre 5 anni fa | 0

Risposto

Listing possible combinations of integers, given constraints (Gear Ratio Related)

One possibility is using an optimization. Here is a simple code for it using OPTI toolbox; clear all,clc % round() is...

Listing possible combinations of integers, given constraints (Gear Ratio Related)

One possibility is using an optimization. Here is a simple code for it using OPTI toolbox; clear all,clc % round() is...

quasi 6 anni fa | 0

Risposto

Count two columns with corresponding data

One thing you can do is (assuming you have newer versions of matlab); A = rand(10,2); % the data a1 = A(A(:,1)<0.3,:); ...

Count two columns with corresponding data

One thing you can do is (assuming you have newer versions of matlab); A = rand(10,2); % the data a1 = A(A(:,1)<0.3,:); ...

quasi 6 anni fa | 0

Risposto

Damping Factor and natural frequency out of time response data

If this is impulse response, you can get the natural frequency by simply finding the time difference between each peak. Invertin...

Damping Factor and natural frequency out of time response data

If this is impulse response, you can get the natural frequency by simply finding the time difference between each peak. Invertin...

quasi 6 anni fa | 2

Risposto

Interpolate between two signals in Simulink

Here is how linear interpolation works; y1 = 10; % known flow rate for 47500 ft y0 = 2; % known flow rate for 23000 ft...

Interpolate between two signals in Simulink

Here is how linear interpolation works; y1 = 10; % known flow rate for 47500 ft y0 = 2; % known flow rate for 23000 ft...

quasi 6 anni fa | 0

Risposto

Plotting FFT of several data sets (signals) of same length, in the same graph

You put all of the signals you want in a matrix (each column is a different partition of the signal); data = rand(60000,1)...

Plotting FFT of several data sets (signals) of same length, in the same graph

You put all of the signals you want in a matrix (each column is a different partition of the signal); data = rand(60000,1)...

quasi 6 anni fa | 0

| accettato

Risposto

ODE45 not updating a variable of nonlinear 2nd order diff.eq system

The reason is simple. Your dxdt(3) is always equal to 0. You do not have an equation for dxdt(3) in your function other than the...

ODE45 not updating a variable of nonlinear 2nd order diff.eq system

The reason is simple. Your dxdt(3) is always equal to 0. You do not have an equation for dxdt(3) in your function other than the...

quasi 6 anni fa | 1

| accettato

Risposto

How can i measure Angle in 3-D?

Check out this <http://portal.tpu.ru:7777/SHARED/k/KONVAL/Sites/English_sites/G/l_Angle_f.htm link> which has the answer.

How can i measure Angle in 3-D?

Check out this <http://portal.tpu.ru:7777/SHARED/k/KONVAL/Sites/English_sites/G/l_Angle_f.htm link> which has the answer.

quasi 6 anni fa | 0

Risposto

Eulers Method Returning an Answer close but not exactly correct

The reason is simple. The time in your code start from 1 where as online calculators start from 0. If you adjusted your equat...

Eulers Method Returning an Answer close but not exactly correct

The reason is simple. The time in your code start from 1 where as online calculators start from 0. If you adjusted your equat...

quasi 6 anni fa | 0

Risposto

How to conditionally solve two ODEs simultaneously using 'if-else' ?

ode45 does not check its values between start and end time. That is why you need to write your own solver or include the ifelse ...

How to conditionally solve two ODEs simultaneously using 'if-else' ?

ode45 does not check its values between start and end time. That is why you need to write your own solver or include the ifelse ...

quasi 6 anni fa | 1

| accettato

Risposto

How to solve the following System of first order differential equations using ode45?please help

First you create your function that outputs derivative of q when time and q are given to it. function qd = asd(t,q) k1...

How to solve the following System of first order differential equations using ode45?please help

First you create your function that outputs derivative of q when time and q are given to it. function qd = asd(t,q) k1...

quasi 6 anni fa | 1