Answered
How can I get "simple PID closed-loop controller" code for Matlab function for applying in simulink ?
@Rawaz Aziz, From the description of the problem, it seemed that you want a modified closed-loop controller like this: % pid co...

2 years ago | 0

Answered
2-order linear differential equation with paramaters
Hi @Antonino Roccaforte, I'm unfamiliar with your ODE, but I tested it with dsolve, and there are some results, and one of the...

2 years ago | 0

Answered
Dealing with transfer function in symbolic math toolbox.
Hi @Hamza Harbi In MATLAB, the transfer function is preferred to be modeled as a tf-class System Object, which is used for simu...

2 years ago | 1

Answered
Plotting trapezoids in one graph
Hi @davut The complementary trapezoid is different from the flipped trapezoid, and thus, they have different mathematical formu...

2 years ago | 1

Answered
how to make bode plot in simulink system
Hi @Kyungmin You can insert the Bode Plot block in the Simulink model and follow the steps described in this link for visualizi...

2 years ago | 0

| accepted

Answered
how to apply single controller to multiple systems
Hi @K Kalanithi Here is a relatively simple script demonstrating an example of how to plot all responses of multiple systems th...

2 years ago | 1

| accepted

Answered
Solve the Pendulum problem 2θ¨=-2sinθ-3θ˙
Hi @Nirupa If you are determined to learn solving differential equations using MATLAB, there are various examples in the follow...

2 years ago | 0

Answered
Writing functions f(x,y)
Hi @Kaleina For a static function, especially a function of two variables, this is how I systematically find the minimum point....

2 years ago | 2

Answered
How to automatically find the function that linearizes another function.
Hi @Federico Massimi Some instruments may respond nonlinearly when the measurement signal is out of the standard operating rang...

2 years ago | 1

| accepted

Answered
can i decide the RL agents actions
Hi @Sourabh I believe that it has something to do with the StopTrainingCriteria and StopTrainingValue options of your rlTrainin...

2 years ago | 0

Answered
Error using bell Derivative of state '1' in block 'afasm50b22/VSC Control1/VDC Regulator/PID Controller1/Integrator/Continuous/Integrator' at time 0.055735 is not finite. The
Hi @wael The primary error is most likely caused by a division-by-zero term occurring when one of the state variables approache...

2 years ago | 0

Answered
what is the code for plotting the differential equation w.r.t. a particular parameter not w.r.t. time. help please?
Hi @ZAHID YOUSUF If you are familiar with second-order systems like the harmonic oscillator, here is an example that shows a 3-...

2 years ago | 1

| accepted

Answered
Plotting system outputs together with different time intervals for each system? HELP!
The lsim() function offers better control than the step() function. t = 0:0.001:15; Ts = [1 2 3 4 5]; w = 4./Ts; for j = 1...

2 years ago | 0

Answered
Problem related with "odeToVectorField"
I don't see any symbolic differential variables in these three so-called ODEs. That's why odeToVectorField() threw the error mes...

2 years ago | 0

Answered
How to get a view of Membership function in Fuzzy logic ??
Instead of printing the screen to create a screenshot of the membership functions (MFs), you can use the function plotmf() to pl...

2 years ago | 0

Answered
How to model PID flow control with throttling (butterfly) valve in wells turbine in owc?
Hi @Rania Modeling in MATLAB generally requires a good understanding of the system that you intend to control. Start by develop...

2 years ago | 0

Answered
Reinforcement Learning algorithm to tune PID parameters of a system
Hi @Bipratip, I didn't check everything, but I noticed that you reused the same quadratic cost function (Reward in RL terms) fr...

2 years ago | 0

Answered
Problem using tf to perform a transfer function.
Hi @Leaysia Lampkin If you are unable to obtain the Control System Toolbox, many useful MATLAB-compatible functions can still b...

2 years ago | 1

Answered
Please help me find a PID controller coefficient
Assuming the Ideal form: The PID controller in MATLAB takes the practical form , where represents the time constant of the de...

2 years ago | 0

Answered
How to find the equilibrium points of dynamics system?
The system has two equilibrium points ( and ). It is possible to evaluate the system's stability through a graphical method. Fro...

2 years ago | 1

Answered
Matlab code for 2nd order differential equations
Hi @KARUNA BOPPENA Which textbook are you referring to for this problem? This appears to be a boundary value problem. The so...

2 years ago | 1

Answered
How to convert simulink based Reinforcement learning environment to function or script based.
Hi @Chetan Thakur I believe you can create a MATLAB function to describe the water level in a pump-driven storage tank, and the...

2 years ago | 1

| accepted

Answered
Solve closed loop system equation with disturbance input via function handle
Hi @Fabian Friz In addition to using the 1-D data interpolation method interp1(), as suggested by @Torsten, it is also possible...

2 years ago | 1

Answered
Ordinary differential equations with two unknows (ode45)
Hi @Mei Cheng If ode15s() solver is used, the simulation runs. You should be able to plot the results. p.a = 0.0062; p.b...

2 years ago | 1

| accepted

Answered
getting error while plotting graph
Hi @Puneet, Update: I have established the relationship between displacement and velocity using trigonometric functions, specif...

2 years ago | 0

Answered
Find f if f′′(x) = 4−6x−40x3, f(0) = 2 and f′(0) = 1
Hello @Ronald Since the function is a polynomial, you can apply the power rule to obtain where is an arbitrary constant kn...

2 years ago | 0

Answered
Can't extract variables that give the best cost function from PSO code
Hi @Phumelele Magagula I've made some modifications to the PSO code in order to test the toy problem, as certain crucial pieces...

2 years ago | 0

Answered
I am using ODE45 to solve a system of 4 ODEs. my DVsol ( that contains all results for my Dpendent Variables) are showing zero.
Hi @S Ashish Update: In short, the zeros are the equilibrium points of the system. Here are Trajectories obtained from the non-...

2 years ago | 1

| accepted

Answered
ODE solution for a magnetic flux equation
Hi @Syed Muhammad Ghufran Please check if this is what you are looking for. tspan = 0:0.1:10; phi0 = 0; [t, phi] = ...

2 years ago | 1

| accepted

Answered
Find X,Y,Z of this linear
Alternative approach. This should produce the same results as @Nathan Hardenberg. A = [26 472 791; 42 567 358; 49 5...

2 years ago | 1

Load more