Tag Archives: matlab
How can i isolate an object and find its orientation with respect to another object?
I am new to image processing toolbox in Matlab and I wanted some directions or steps on how I could do this process. In the center of this image in the center of the hole (on the cross hair), I have a piece of material which is almost hexagonal in shape with reddish color. I have multiple pictures similar to this where the material is oriented slightly differently.
Could someone please tell me how can I isolate this object from the rest of the image and then find its orientation? I tried to use image contrast and segmentation, but it wasnt super clean.I am new to image processing toolbox in Matlab and I wanted some directions or steps on how I could do this process. In the center of this image in the center of the hole (on the cross hair), I have a piece of material which is almost hexagonal in shape with reddish color. I have multiple pictures similar to this where the material is oriented slightly differently.
Could someone please tell me how can I isolate this object from the rest of the image and then find its orientation? I tried to use image contrast and segmentation, but it wasnt super clean. I am new to image processing toolbox in Matlab and I wanted some directions or steps on how I could do this process. In the center of this image in the center of the hole (on the cross hair), I have a piece of material which is almost hexagonal in shape with reddish color. I have multiple pictures similar to this where the material is oriented slightly differently.
Could someone please tell me how can I isolate this object from the rest of the image and then find its orientation? I tried to use image contrast and segmentation, but it wasnt super clean. image processing MATLAB Answers — New Questions
Assessment failure in Task 1 of Solar Energy module: P_AC signal shows incorrect at the end of simulation.
I am experiencing a persistent assessment failure in the "Solar Energy" section, Task 1, of the Power Systems Simulation Onramp course.
The Problem: I have connected the signal labeled P_AC to the Signal Assessment block as instructed. The connection in the model is a solid black line, yet the assessment returns "Incorrect" with a hint suggesting an unconnected signal.
Symptoms:
The Assessment graph shows red dots (incorrect data) specifically at the end of the simulation period (approx. seconds 23-25).
I have confirmed that the Enable MPPT block is set to 0.
Steps already taken:
Deleted and re-connected the P_AC signal multiple times to ensure a solid connection.
Ran the simulation until completion (100% ready).
Used the "Reset" button for the task and re-attempted.
Could you please check if this is a known issue with the auto-grader for this specific task?I am experiencing a persistent assessment failure in the "Solar Energy" section, Task 1, of the Power Systems Simulation Onramp course.
The Problem: I have connected the signal labeled P_AC to the Signal Assessment block as instructed. The connection in the model is a solid black line, yet the assessment returns "Incorrect" with a hint suggesting an unconnected signal.
Symptoms:
The Assessment graph shows red dots (incorrect data) specifically at the end of the simulation period (approx. seconds 23-25).
I have confirmed that the Enable MPPT block is set to 0.
Steps already taken:
Deleted and re-connected the P_AC signal multiple times to ensure a solid connection.
Ran the simulation until completion (100% ready).
Used the "Reset" button for the task and re-attempted.
Could you please check if this is a known issue with the auto-grader for this specific task? I am experiencing a persistent assessment failure in the "Solar Energy" section, Task 1, of the Power Systems Simulation Onramp course.
The Problem: I have connected the signal labeled P_AC to the Signal Assessment block as instructed. The connection in the model is a solid black line, yet the assessment returns "Incorrect" with a hint suggesting an unconnected signal.
Symptoms:
The Assessment graph shows red dots (incorrect data) specifically at the end of the simulation period (approx. seconds 23-25).
I have confirmed that the Enable MPPT block is set to 0.
Steps already taken:
Deleted and re-connected the P_AC signal multiple times to ensure a solid connection.
Ran the simulation until completion (100% ready).
Used the "Reset" button for the task and re-attempted.
Could you please check if this is a known issue with the auto-grader for this specific task? power systems simulation onramp, mppt, signal asse MATLAB Answers — New Questions
Parsing mfunctions with mtree
Given an Nx1 colum vector of strings containing lines of mfunction code, it is possible to use the undocumented function mtree() to parse it into its constituent functions. For example, given,
load Inputs
str1,
the function below will find the starting and ending lines of each of the three function blocks.
[firstLine,lastLine] = functionBlocks(str1)
This works for nested functions as well:
str2,
[firstLine,lastLine] = functionBlocks(str2)
However, I would really like to have the function be able to group the output separately into top-level function blocks and nested function blocks. I know it is possible to do this through a post-analysis of the outputs firstLine and lastLine, but I wonder if it is possible to get information about whether a function block is top-level or nested directly from mtree, i.e., by modifying,
fnSet = T.mtfind(‘Kind’,’FUNCTION’);
Unfortunately, because mtree() is undocumented, it is difficult to fathom its full capabilities. Does anyone know if/how this can be done?
function [firstLine,lastLine] = functionBlocks(str)
T = mtree(strjoin(str,newline));
fnSet = T.mtfind(‘Kind’,’FUNCTION’);
K=fnSet.count;
kset=fnSet.indices;
for k = K:-1:1
fn = fnSet.select(kset(k));
firstLine(k) = fn.lineno;
lastLine(k) = fn.lastone;
end
endGiven an Nx1 colum vector of strings containing lines of mfunction code, it is possible to use the undocumented function mtree() to parse it into its constituent functions. For example, given,
load Inputs
str1,
the function below will find the starting and ending lines of each of the three function blocks.
[firstLine,lastLine] = functionBlocks(str1)
This works for nested functions as well:
str2,
[firstLine,lastLine] = functionBlocks(str2)
However, I would really like to have the function be able to group the output separately into top-level function blocks and nested function blocks. I know it is possible to do this through a post-analysis of the outputs firstLine and lastLine, but I wonder if it is possible to get information about whether a function block is top-level or nested directly from mtree, i.e., by modifying,
fnSet = T.mtfind(‘Kind’,’FUNCTION’);
Unfortunately, because mtree() is undocumented, it is difficult to fathom its full capabilities. Does anyone know if/how this can be done?
function [firstLine,lastLine] = functionBlocks(str)
T = mtree(strjoin(str,newline));
fnSet = T.mtfind(‘Kind’,’FUNCTION’);
K=fnSet.count;
kset=fnSet.indices;
for k = K:-1:1
fn = fnSet.select(kset(k));
firstLine(k) = fn.lineno;
lastLine(k) = fn.lastone;
end
end Given an Nx1 colum vector of strings containing lines of mfunction code, it is possible to use the undocumented function mtree() to parse it into its constituent functions. For example, given,
load Inputs
str1,
the function below will find the starting and ending lines of each of the three function blocks.
[firstLine,lastLine] = functionBlocks(str1)
This works for nested functions as well:
str2,
[firstLine,lastLine] = functionBlocks(str2)
However, I would really like to have the function be able to group the output separately into top-level function blocks and nested function blocks. I know it is possible to do this through a post-analysis of the outputs firstLine and lastLine, but I wonder if it is possible to get information about whether a function block is top-level or nested directly from mtree, i.e., by modifying,
fnSet = T.mtfind(‘Kind’,’FUNCTION’);
Unfortunately, because mtree() is undocumented, it is difficult to fathom its full capabilities. Does anyone know if/how this can be done?
function [firstLine,lastLine] = functionBlocks(str)
T = mtree(strjoin(str,newline));
fnSet = T.mtfind(‘Kind’,’FUNCTION’);
K=fnSet.count;
kset=fnSet.indices;
for k = K:-1:1
fn = fnSet.select(kset(k));
firstLine(k) = fn.lineno;
lastLine(k) = fn.lastone;
end
end mtree, undocumented, parsing, functions MATLAB Answers — New Questions
lqr controller for purely magnetic actuation of 3u cubesat
im designing a lqr controller for a time variant system for purely magnetic actuation. i am using an algorithm where we use hamiltonian and the symplectic property(schur decomposition) to find out the solution of the algebraic riccati equation P. I need help to implement this in matlab/simulink.im designing a lqr controller for a time variant system for purely magnetic actuation. i am using an algorithm where we use hamiltonian and the symplectic property(schur decomposition) to find out the solution of the algebraic riccati equation P. I need help to implement this in matlab/simulink. im designing a lqr controller for a time variant system for purely magnetic actuation. i am using an algorithm where we use hamiltonian and the symplectic property(schur decomposition) to find out the solution of the algebraic riccati equation P. I need help to implement this in matlab/simulink. control_systems, lqr_design MATLAB Answers — New Questions
Up Chirp and Down Chirp Generation in a Single plot
I am trying to generate a chirp signal with both up chirp and down chirp for one of my project, upchirp – which has start frequency of 57 GHz and Bandwidth of 150MHz then after 2microseconds and again have to generate down chirp with the same bandwidth and frequencyI am trying to generate a chirp signal with both up chirp and down chirp for one of my project, upchirp – which has start frequency of 57 GHz and Bandwidth of 150MHz then after 2microseconds and again have to generate down chirp with the same bandwidth and frequency I am trying to generate a chirp signal with both up chirp and down chirp for one of my project, upchirp – which has start frequency of 57 GHz and Bandwidth of 150MHz then after 2microseconds and again have to generate down chirp with the same bandwidth and frequency fmcw, radar, fft MATLAB Answers — New Questions
Matlab slows down when the window is minimized
Hi everyone,
I’m running some heavy code and found that when I reduce the Matlab window, the code execution significantly slows down. How can I address this issue? I’ve already tried using the task manager to give Matlab a higher priority, but it didn’t work. Thank you in advance.Hi everyone,
I’m running some heavy code and found that when I reduce the Matlab window, the code execution significantly slows down. How can I address this issue? I’ve already tried using the task manager to give Matlab a higher priority, but it didn’t work. Thank you in advance. Hi everyone,
I’m running some heavy code and found that when I reduce the Matlab window, the code execution significantly slows down. How can I address this issue? I’ve already tried using the task manager to give Matlab a higher priority, but it didn’t work. Thank you in advance. speed, code execution slows down MATLAB Answers — New Questions
How can I test my EtherCAT network outside of Simulink Real-Time (SLRT) to verify my EtherCAT configuration is okay?
I am using Simulink Real-Time with a Speedgoat target as my main device for my EtherCAT network. I have used Beckhoff’s TwinCAT3 to configure my ENI file that I plan to use.
I may also be having an issue with my subdevices not responding to commands or my EtherCAT network not getting to OP state, and I suspect my ENI configuration file may have issues.
How can I test this configuration?I am using Simulink Real-Time with a Speedgoat target as my main device for my EtherCAT network. I have used Beckhoff’s TwinCAT3 to configure my ENI file that I plan to use.
I may also be having an issue with my subdevices not responding to commands or my EtherCAT network not getting to OP state, and I suspect my ENI configuration file may have issues.
How can I test this configuration? I am using Simulink Real-Time with a Speedgoat target as my main device for my EtherCAT network. I have used Beckhoff’s TwinCAT3 to configure my ENI file that I plan to use.
I may also be having an issue with my subdevices not responding to commands or my EtherCAT network not getting to OP state, and I suspect my ENI configuration file may have issues.
How can I test this configuration? ethercat, validation, slrt MATLAB Answers — New Questions
Matlab crashing after the launching for few munites
I’m using the MATLAB2025b version and I got this feedback after crashing: Unable to communicate with required MathWorks services (error 5201).
For help with this issue, contact support:
https://www.mathworks.com/support/contact_us.html
Unable to launch MVM server: License Error: Licensing shutdownI’m using the MATLAB2025b version and I got this feedback after crashing: Unable to communicate with required MathWorks services (error 5201).
For help with this issue, contact support:
https://www.mathworks.com/support/contact_us.html
Unable to launch MVM server: License Error: Licensing shutdown I’m using the MATLAB2025b version and I got this feedback after crashing: Unable to communicate with required MathWorks services (error 5201).
For help with this issue, contact support:
https://www.mathworks.com/support/contact_us.html
Unable to launch MVM server: License Error: Licensing shutdown stop working or crash MATLAB Answers — New Questions
Damping constant in General flexible Beam
Hi.
I’m using the General flexible Beam model given in Simscape Multibody. In which you can define the "Damping constant (beta)" in s.
My problem is that I don’t know a damping coeffizient with seconds as the unit. I want to implement results from real life experiments out of which I calculated the logarithmic decrement in s^-1.
So my main question is, what kind of damping coefficient is used in the simscape model as I want to implement my test results?
Thanks and best regardsHi.
I’m using the General flexible Beam model given in Simscape Multibody. In which you can define the "Damping constant (beta)" in s.
My problem is that I don’t know a damping coeffizient with seconds as the unit. I want to implement results from real life experiments out of which I calculated the logarithmic decrement in s^-1.
So my main question is, what kind of damping coefficient is used in the simscape model as I want to implement my test results?
Thanks and best regards Hi.
I’m using the General flexible Beam model given in Simscape Multibody. In which you can define the "Damping constant (beta)" in s.
My problem is that I don’t know a damping coeffizient with seconds as the unit. I want to implement results from real life experiments out of which I calculated the logarithmic decrement in s^-1.
So my main question is, what kind of damping coefficient is used in the simscape model as I want to implement my test results?
Thanks and best regards simscape multibody, damping MATLAB Answers — New Questions
How to show Robotics System Toolbox (RigidBodyTree) visualization with App Designer?
How to show MATLAB Robotics System Toolbox (RigidBodyTree) visualization with App Designer?
Uiaxes does not support the robotics.RigidBodyTree.show right now, are there any other options?
This is the mentioned property:
https://www.mathworks.com/help/robotics/ref/rigidbodytree.show.htmlHow to show MATLAB Robotics System Toolbox (RigidBodyTree) visualization with App Designer?
Uiaxes does not support the robotics.RigidBodyTree.show right now, are there any other options?
This is the mentioned property:
https://www.mathworks.com/help/robotics/ref/rigidbodytree.show.html How to show MATLAB Robotics System Toolbox (RigidBodyTree) visualization with App Designer?
Uiaxes does not support the robotics.RigidBodyTree.show right now, are there any other options?
This is the mentioned property:
https://www.mathworks.com/help/robotics/ref/rigidbodytree.show.html app, rigidbodytree MATLAB Answers — New Questions
Problem replicating the Venturi effect (pressure rise from small area to large area) with Simscape Gas
I’m trying to create a minimal model in Simscape to replicate the Venturi effect in a Simscape Gas model: Gas is flowing from point A to point B, and the cross-sectional area of the duct at point A is smaller than B; as a result, the static pressure at A must be lower than B (assuming negligible energy loss from A to B).
I tried two different setups to replicate this. First, I used a "Local Restriction (G)" block (with a fixed restriction area), which has this orifice structure built in. The flow is provided by a Flow Rate Source block, and I added a Flow Resistance block downstream to allow the pressure at the port B of the Local Restriction to vary. Here is a screenshot of the model:
I expect that at least for some combination of restriction area and flow rate, the pressure at the restriction, p_R, must be lower than port B. I tried running the simulation with different values of flow rate and restriction area, but p_R was always higher than pressure at B.
Next, I used two consecutive Pipe (G) elements: the first one with a smaller surface area and hydraulic diameter, and the second with larger values for both. The rest of the setup is similar:
Again, I expect the internal pressure of the Small Pipe to be lower than the internal pressure of the Big Pipe, but this was never the case. I ran the simulation for different values of pipe surface area and hydraulic diameter for the two pipes, and kept the pipe length, internal surface roughness, and the laminar friction constants low to reduce the pressure loss due to friction. I also tried reducing the dynamic viscosity in the Gas Properties block, and disabling/enabling gas compressibility in the pipes.
In both models, I kept the rest of the settings and parameters as default (e.g., perfect gas with properties of dry air, daessc solver, etc.). The models are attached.
Am I doing something wrong, or are there any limitations and theoretical assumptions in Simscape Gas that do not allow replicating this effect?
Thanks in advance!I’m trying to create a minimal model in Simscape to replicate the Venturi effect in a Simscape Gas model: Gas is flowing from point A to point B, and the cross-sectional area of the duct at point A is smaller than B; as a result, the static pressure at A must be lower than B (assuming negligible energy loss from A to B).
I tried two different setups to replicate this. First, I used a "Local Restriction (G)" block (with a fixed restriction area), which has this orifice structure built in. The flow is provided by a Flow Rate Source block, and I added a Flow Resistance block downstream to allow the pressure at the port B of the Local Restriction to vary. Here is a screenshot of the model:
I expect that at least for some combination of restriction area and flow rate, the pressure at the restriction, p_R, must be lower than port B. I tried running the simulation with different values of flow rate and restriction area, but p_R was always higher than pressure at B.
Next, I used two consecutive Pipe (G) elements: the first one with a smaller surface area and hydraulic diameter, and the second with larger values for both. The rest of the setup is similar:
Again, I expect the internal pressure of the Small Pipe to be lower than the internal pressure of the Big Pipe, but this was never the case. I ran the simulation for different values of pipe surface area and hydraulic diameter for the two pipes, and kept the pipe length, internal surface roughness, and the laminar friction constants low to reduce the pressure loss due to friction. I also tried reducing the dynamic viscosity in the Gas Properties block, and disabling/enabling gas compressibility in the pipes.
In both models, I kept the rest of the settings and parameters as default (e.g., perfect gas with properties of dry air, daessc solver, etc.). The models are attached.
Am I doing something wrong, or are there any limitations and theoretical assumptions in Simscape Gas that do not allow replicating this effect?
Thanks in advance! I’m trying to create a minimal model in Simscape to replicate the Venturi effect in a Simscape Gas model: Gas is flowing from point A to point B, and the cross-sectional area of the duct at point A is smaller than B; as a result, the static pressure at A must be lower than B (assuming negligible energy loss from A to B).
I tried two different setups to replicate this. First, I used a "Local Restriction (G)" block (with a fixed restriction area), which has this orifice structure built in. The flow is provided by a Flow Rate Source block, and I added a Flow Resistance block downstream to allow the pressure at the port B of the Local Restriction to vary. Here is a screenshot of the model:
I expect that at least for some combination of restriction area and flow rate, the pressure at the restriction, p_R, must be lower than port B. I tried running the simulation with different values of flow rate and restriction area, but p_R was always higher than pressure at B.
Next, I used two consecutive Pipe (G) elements: the first one with a smaller surface area and hydraulic diameter, and the second with larger values for both. The rest of the setup is similar:
Again, I expect the internal pressure of the Small Pipe to be lower than the internal pressure of the Big Pipe, but this was never the case. I ran the simulation for different values of pipe surface area and hydraulic diameter for the two pipes, and kept the pipe length, internal surface roughness, and the laminar friction constants low to reduce the pressure loss due to friction. I also tried reducing the dynamic viscosity in the Gas Properties block, and disabling/enabling gas compressibility in the pipes.
In both models, I kept the rest of the settings and parameters as default (e.g., perfect gas with properties of dry air, daessc solver, etc.). The models are attached.
Am I doing something wrong, or are there any limitations and theoretical assumptions in Simscape Gas that do not allow replicating this effect?
Thanks in advance! simscape, gas, fluid dynamics, simulation MATLAB Answers — New Questions
Why do I receive Licence Manager Error-8 ?
I enter the licence key during installation.When I enter the applicatiıon after the isntallation is complete I am receiving the following error code.I enter the licence key during installation.When I enter the applicatiıon after the isntallation is complete I am receiving the following error code. I enter the licence key during installation.When I enter the applicatiıon after the isntallation is complete I am receiving the following error code. matlab 913_r2022b_win64 MATLAB Answers — New Questions
imuSensor and Allan Variance
Hello everyone,
I am creating an IMU simulation using the built-in imuSensor model in MATLAB. The block includes several parameters that define IMU noise characteristics, but I do not fully understand how these parameters relate to Allan variance–derived noise coefficients.
Here is the list of gyroscope parameters available in
——————————————————————————————
gyroparams with properties:
MeasurementRange: Inf rad/s
Resolution: 0 (rad/s)/LSB
ConstantBias: [0 0 0] rad/s
AxesMisalignment: [3⨯3 double] %
NoiseDensity: [0 0 0] (rad/s)/√Hz
BiasInstability: [0 0 0] rad/s
RandomWalk: [0 0 0] (rad/s)*√Hz
NoiseType: "double-sided"
BiasInstabilityCoefficients: [1⨯1 struct]
TemperatureBias: [0 0 0] (rad/s)/°C
TemperatureScaleFactor: [0 0 0] %/°C
AccelerationBias: [0 0 0] (rad/s)/(m/s²)
——————————————————————————————
I have estimated my sensor noise parameters from Allan variance analysis, specifically:
ARW (N)
Bias Instability (B)
Rate Random Walk (K)
My goal is to correctly map these Allan variance parameters N, B, and K to the corresponding imuSensor block parameters:
NoiseDensity
BiasInstability
RandomWalk
I would appreciate clarification on how these quantities correspond mathematically and physically, and how to correctly convert Allan variance results into the parameters expected by MATLAB’s IMU sensor model.Hello everyone,
I am creating an IMU simulation using the built-in imuSensor model in MATLAB. The block includes several parameters that define IMU noise characteristics, but I do not fully understand how these parameters relate to Allan variance–derived noise coefficients.
Here is the list of gyroscope parameters available in
——————————————————————————————
gyroparams with properties:
MeasurementRange: Inf rad/s
Resolution: 0 (rad/s)/LSB
ConstantBias: [0 0 0] rad/s
AxesMisalignment: [3⨯3 double] %
NoiseDensity: [0 0 0] (rad/s)/√Hz
BiasInstability: [0 0 0] rad/s
RandomWalk: [0 0 0] (rad/s)*√Hz
NoiseType: "double-sided"
BiasInstabilityCoefficients: [1⨯1 struct]
TemperatureBias: [0 0 0] (rad/s)/°C
TemperatureScaleFactor: [0 0 0] %/°C
AccelerationBias: [0 0 0] (rad/s)/(m/s²)
——————————————————————————————
I have estimated my sensor noise parameters from Allan variance analysis, specifically:
ARW (N)
Bias Instability (B)
Rate Random Walk (K)
My goal is to correctly map these Allan variance parameters N, B, and K to the corresponding imuSensor block parameters:
NoiseDensity
BiasInstability
RandomWalk
I would appreciate clarification on how these quantities correspond mathematically and physically, and how to correctly convert Allan variance results into the parameters expected by MATLAB’s IMU sensor model. Hello everyone,
I am creating an IMU simulation using the built-in imuSensor model in MATLAB. The block includes several parameters that define IMU noise characteristics, but I do not fully understand how these parameters relate to Allan variance–derived noise coefficients.
Here is the list of gyroscope parameters available in
——————————————————————————————
gyroparams with properties:
MeasurementRange: Inf rad/s
Resolution: 0 (rad/s)/LSB
ConstantBias: [0 0 0] rad/s
AxesMisalignment: [3⨯3 double] %
NoiseDensity: [0 0 0] (rad/s)/√Hz
BiasInstability: [0 0 0] rad/s
RandomWalk: [0 0 0] (rad/s)*√Hz
NoiseType: "double-sided"
BiasInstabilityCoefficients: [1⨯1 struct]
TemperatureBias: [0 0 0] (rad/s)/°C
TemperatureScaleFactor: [0 0 0] %/°C
AccelerationBias: [0 0 0] (rad/s)/(m/s²)
——————————————————————————————
I have estimated my sensor noise parameters from Allan variance analysis, specifically:
ARW (N)
Bias Instability (B)
Rate Random Walk (K)
My goal is to correctly map these Allan variance parameters N, B, and K to the corresponding imuSensor block parameters:
NoiseDensity
BiasInstability
RandomWalk
I would appreciate clarification on how these quantities correspond mathematically and physically, and how to correctly convert Allan variance results into the parameters expected by MATLAB’s IMU sensor model. allan variance imu sensör MATLAB Answers — New Questions
SVC CONTROL(detailed model)
I can’t find how we choose the size of TCR and TSC in Static Var compensator example(detailed model)I can’t find how we choose the size of TCR and TSC in Static Var compensator example(detailed model) I can’t find how we choose the size of TCR and TSC in Static Var compensator example(detailed model) tsc, tcr MATLAB Answers — New Questions
2FSK example Simulink model to 4FSK
Hi,
I used the 2FSK example Simulink model, changed the M‑ary value to 4, and tested it on the ADALM‑PLUTO transmitter with a sample rate of 32 MHz. However, in the spectrum, I am seeing continuous harmonics. What are the recommended values for samples per symbol (SPS), samples per frame (SFS), and frequency separation?Hi,
I used the 2FSK example Simulink model, changed the M‑ary value to 4, and tested it on the ADALM‑PLUTO transmitter with a sample rate of 32 MHz. However, in the spectrum, I am seeing continuous harmonics. What are the recommended values for samples per symbol (SPS), samples per frame (SFS), and frequency separation? Hi,
I used the 2FSK example Simulink model, changed the M‑ary value to 4, and tested it on the ADALM‑PLUTO transmitter with a sample rate of 32 MHz. However, in the spectrum, I am seeing continuous harmonics. What are the recommended values for samples per symbol (SPS), samples per frame (SFS), and frequency separation? fsk, adalm-pluto MATLAB Answers — New Questions
Negative torque pump: Pressure at port A must be greater than or equal to Minimum valid pressure.
Hello everyone,
I am working on a hydraulic circuit that is driven by a motor operated by a Frequency Drive(VFD). (to simpify the model and avoid sharing confidential data, I used Test sequence with a negative torque output to simulate the VFD output) The motor control of the VFD creates some oscillations reaching negative torque values in the generated motor torque resulting in errors of the fixed displacement pump and pipe, eventually stopping the simulation.
Error:An error occurred during simulation and the simulation was terminated
Caused by:
[‘HydraulicCircuit/Solver Configuration’]: At time 3.500000, one or more assertions are triggered. See causes for specific information.
Pressure at port B must be greater than or equal to Minimum valid pressure. The assertion comes from:
Block path: HydraulicCircuit/Fixed-Displacement Pump (TL)
Assert location:
o (location information is protected)
Pressure at port A must be greater than or equal to Minimum valid pressure. The assertion comes from:
Block path: HydraulicCircuit/Pipe (TL)
Assert location:
o (location information is protected)
o (location information is protected)
I am looking for a way to make the hydraulic circuit resistant to these sudden pressure drops as they will certainly occur due to PID regulator settings of the VFD.Hello everyone,
I am working on a hydraulic circuit that is driven by a motor operated by a Frequency Drive(VFD). (to simpify the model and avoid sharing confidential data, I used Test sequence with a negative torque output to simulate the VFD output) The motor control of the VFD creates some oscillations reaching negative torque values in the generated motor torque resulting in errors of the fixed displacement pump and pipe, eventually stopping the simulation.
Error:An error occurred during simulation and the simulation was terminated
Caused by:
[‘HydraulicCircuit/Solver Configuration’]: At time 3.500000, one or more assertions are triggered. See causes for specific information.
Pressure at port B must be greater than or equal to Minimum valid pressure. The assertion comes from:
Block path: HydraulicCircuit/Fixed-Displacement Pump (TL)
Assert location:
o (location information is protected)
Pressure at port A must be greater than or equal to Minimum valid pressure. The assertion comes from:
Block path: HydraulicCircuit/Pipe (TL)
Assert location:
o (location information is protected)
o (location information is protected)
I am looking for a way to make the hydraulic circuit resistant to these sudden pressure drops as they will certainly occur due to PID regulator settings of the VFD. Hello everyone,
I am working on a hydraulic circuit that is driven by a motor operated by a Frequency Drive(VFD). (to simpify the model and avoid sharing confidential data, I used Test sequence with a negative torque output to simulate the VFD output) The motor control of the VFD creates some oscillations reaching negative torque values in the generated motor torque resulting in errors of the fixed displacement pump and pipe, eventually stopping the simulation.
Error:An error occurred during simulation and the simulation was terminated
Caused by:
[‘HydraulicCircuit/Solver Configuration’]: At time 3.500000, one or more assertions are triggered. See causes for specific information.
Pressure at port B must be greater than or equal to Minimum valid pressure. The assertion comes from:
Block path: HydraulicCircuit/Fixed-Displacement Pump (TL)
Assert location:
o (location information is protected)
Pressure at port A must be greater than or equal to Minimum valid pressure. The assertion comes from:
Block path: HydraulicCircuit/Pipe (TL)
Assert location:
o (location information is protected)
o (location information is protected)
I am looking for a way to make the hydraulic circuit resistant to these sudden pressure drops as they will certainly occur due to PID regulator settings of the VFD. hydraulic_system, thermal_liquid MATLAB Answers — New Questions
mcb_ee_pmsm_foc.slx is not getting executed ,i am getting error Could not open source package
not workingnot working not working not working MATLAB Answers — New Questions
Latency check for the simulink model.
Hello,I have created a simulink model and want to check individual blocks latency in the simulink.Some one please suggest me what is the best way to check the latency of the individual blocks and also check latency of complete model.Hello,I have created a simulink model and want to check individual blocks latency in the simulink.Some one please suggest me what is the best way to check the latency of the individual blocks and also check latency of complete model. Hello,I have created a simulink model and want to check individual blocks latency in the simulink.Some one please suggest me what is the best way to check the latency of the individual blocks and also check latency of complete model. simulink latency, block latency MATLAB Answers — New Questions
The Display block and Scope block of Simulink did not work when running external mode to tuning
As the title, I am trying to use external mode to model the PMSM board (STM32H7) to tune, I used the display block or scope but it is not working.
The image is attached below, as you see, when the switch changed between 0 and 1, the display block was always 0 while the system was working normally.
I know in external mode, we could use the data inspecter or logic analyzer which is of the tool, but it is inconvenient.
Therefore, I really would like to know how to config the MATLAB/Simulink to use these block in external mode. (I tried some ways but not work)
I use the 2024b version.
Thank you in advance for any help you can provide.
Best regards,
Raven PhamAs the title, I am trying to use external mode to model the PMSM board (STM32H7) to tune, I used the display block or scope but it is not working.
The image is attached below, as you see, when the switch changed between 0 and 1, the display block was always 0 while the system was working normally.
I know in external mode, we could use the data inspecter or logic analyzer which is of the tool, but it is inconvenient.
Therefore, I really would like to know how to config the MATLAB/Simulink to use these block in external mode. (I tried some ways but not work)
I use the 2024b version.
Thank you in advance for any help you can provide.
Best regards,
Raven Pham As the title, I am trying to use external mode to model the PMSM board (STM32H7) to tune, I used the display block or scope but it is not working.
The image is attached below, as you see, when the switch changed between 0 and 1, the display block was always 0 while the system was working normally.
I know in external mode, we could use the data inspecter or logic analyzer which is of the tool, but it is inconvenient.
Therefore, I really would like to know how to config the MATLAB/Simulink to use these block in external mode. (I tried some ways but not work)
I use the 2024b version.
Thank you in advance for any help you can provide.
Best regards,
Raven Pham simulink, external mode, scope block MATLAB Answers — New Questions
Programmatically get edge ids from geometry of femodel
I am using matlab’s pde toolbox and setup a geometry for femodel like this:
% Source – https://stackoverflow.com/q/79888928
% Posted by MiB_Coder
% Retrieved 2026-02-16, License – CC BY-SA 4.0
gd = [3 4 0 1 1 0 0 0 1 1]’; % Example: A simple square
sf = ‘S1’;
ns = (‘S1′)’;
[g,bt] = decsg(gd, sf, ns)
fe = femodel(AnalysisType="electrostatic", Geometry=g);
fe.PlanarType = "axisymmetric";
figure(1); clf;
pdegplot(fe, ‘EdgeLabels’, ‘on’, ‘FaceLabels’,’on’);
axis equal off;
I can get a diagram indicating which edge-id is assign to an edge:
The resulting geometry does not contain information, which vertices form the edges:
>> fe.Geometry
ans =
fegeometry with properties:
NumFaces: 1
NumEdges: 4
NumVertices: 4
NumCells: 0
Vertices: [4×2 double]
Mesh: []
How can I retrieve which edge id belongs to which vertices in the geometry.
How can I retrieve which edge id is where programmatically?How can I retrieve which edge id is where programmatically?I am using matlab’s pde toolbox and setup a geometry for femodel like this:
% Source – https://stackoverflow.com/q/79888928
% Posted by MiB_Coder
% Retrieved 2026-02-16, License – CC BY-SA 4.0
gd = [3 4 0 1 1 0 0 0 1 1]’; % Example: A simple square
sf = ‘S1’;
ns = (‘S1′)’;
[g,bt] = decsg(gd, sf, ns)
fe = femodel(AnalysisType="electrostatic", Geometry=g);
fe.PlanarType = "axisymmetric";
figure(1); clf;
pdegplot(fe, ‘EdgeLabels’, ‘on’, ‘FaceLabels’,’on’);
axis equal off;
I can get a diagram indicating which edge-id is assign to an edge:
The resulting geometry does not contain information, which vertices form the edges:
>> fe.Geometry
ans =
fegeometry with properties:
NumFaces: 1
NumEdges: 4
NumVertices: 4
NumCells: 0
Vertices: [4×2 double]
Mesh: []
How can I retrieve which edge id belongs to which vertices in the geometry.
How can I retrieve which edge id is where programmatically?How can I retrieve which edge id is where programmatically? I am using matlab’s pde toolbox and setup a geometry for femodel like this:
% Source – https://stackoverflow.com/q/79888928
% Posted by MiB_Coder
% Retrieved 2026-02-16, License – CC BY-SA 4.0
gd = [3 4 0 1 1 0 0 0 1 1]’; % Example: A simple square
sf = ‘S1’;
ns = (‘S1′)’;
[g,bt] = decsg(gd, sf, ns)
fe = femodel(AnalysisType="electrostatic", Geometry=g);
fe.PlanarType = "axisymmetric";
figure(1); clf;
pdegplot(fe, ‘EdgeLabels’, ‘on’, ‘FaceLabels’,’on’);
axis equal off;
I can get a diagram indicating which edge-id is assign to an edge:
The resulting geometry does not contain information, which vertices form the edges:
>> fe.Geometry
ans =
fegeometry with properties:
NumFaces: 1
NumEdges: 4
NumVertices: 4
NumCells: 0
Vertices: [4×2 double]
Mesh: []
How can I retrieve which edge id belongs to which vertices in the geometry.
How can I retrieve which edge id is where programmatically?How can I retrieve which edge id is where programmatically? pde, femodel, edge MATLAB Answers — New Questions









