97 questions
4
votes
0
answers
61
views
Direct Collocation Oscillating Reconstructed State Trajectory
I am working with the DirectCollocation class and an often getting trajectory solutions with large oscillations (sometimes in the position, almost always in the velocity). These oscillations seem to ...
Advice
0
votes
0
replies
45
views
What should I learn to deploy low-level RL locomotion policies on quadruped robots?
I am working on a project to build a robust locomotion policy for quadruped robots on adverse terrains using reinforcement learning.
My end goal is to deploy a trained RL policy on real hardware, and ...
0
votes
0
answers
111
views
PID function equivalent from MATLAB to Python
I manage to correctly simulate a closed loop with Simulink using pure python "control" library. However, I'm now trying to do the same with a new closed loop that has uses a PID controller:
...
0
votes
1
answer
535
views
ACADOS non-linear cost calculation
I am new to ACADOS and MPC.
I have a task where I need to define the dynamics of a mobile robot and solve the MPC problem using ACADOS.
I have defined the model using CASADI as follows:
def ...
0
votes
1
answer
174
views
MATLAB: Why does my Kalman filter not work for non-zero input?
I have built a simple kalman filter for an arbritary that seems to work well as long as I do not use a non-zero input. When I run this script with a zero input I can see from my plots at the end that ...
1
vote
0
answers
160
views
Direct and numerically robust conversion from zero-pole to state-space representation
Given (z,p,k) my goal is to convert to a state-space representation (A, B, C, D) with high numerical accuracy and stability. I do not really care about complexity and implementation cost.
One approach ...
6
votes
0
answers
268
views
How can I extract elements from a transfer function matrix in Octave?
I am working with Octave in the control package, and I want to take an array of transfer functions (initialized as follows) and just extract the diagonal elements of the matrix. Whenever I try to do ...
0
votes
1
answer
130
views
Error in formulation of a Derivative(PD) controller
I'm applying Proportional-Derivative controller to control my model in ROS. I'm limited to python 2.7.17 version.
There are two types of errors in this script; position error(ep) and heading error(eth)...
0
votes
1
answer
347
views
Designing a controller using C software to control the pressure(bars) in a system using current(mA) of a proportionally opening valve
I want to design a PI controller in C code for controlling the system Pressure using the Current of a proportional solenoid valve. The valve is normally open, which lets the hydraulic fluid back to ...
0
votes
1
answer
168
views
How to implement a C code for getting proportional output current(mA) values with % of lever opening as the input?
I have a lever/joystick that can be pulled manually, which gives a value range between (0 to 250) depending on the percentage of how much it has been pulled. This serves as my input to the C code. The ...
0
votes
2
answers
2k
views
Balance 2-wheeled robot without making it drift forward/backward
I'm trying to design a controller to balance a 2-wheels robot (around 13kg) and making it robust against external forces (e.g. if someone kicks it, it should not fall and not drift indefinitely ...
0
votes
1
answer
90
views
MATLAB taking hours to solve an equation
I've been trying to solve an equation composed of matrices. MATLAB has run it for almost two hours now and nothing. It's supposed to multiply some 8x8 matrices and invert one 8x8 matrix. Should it ...
0
votes
1
answer
2k
views
How to convert a state-space model to transfer function?
Following this question, I am trying to convert the state-space model from this tutorial back into its transfer-function form. I have tried the
R = 2.0; % Ohms
L = 0.5; % ...
0
votes
1
answer
642
views
Model Predictive Control (MPC) for electromechanical system
So I want to create an MPC controller for my seesaw-cart system. All the "grunt work" (getting equations of motion, state-space representation etc.) has been done, so I went into coding into ...
1
vote
1
answer
2k
views
Understanding the ss() and tf2ss() functions and their differences
Following this question, I am trying to comprehend the functionality of MATLAB's ss() and tf2ss() functions and their differences. Consider the code below:
Kf = 0.2;
J = 0.02;
h2 = tf(1, [J Kf]);
...