Category: Matlab
Category Archives: Matlab
Lane Keeping Assist with Lane Detection/unreal engine
Is it possible to make "
Lane Keeping Assist with Lane Detection
"visualize in unreal engine?Is it possible to make "
Lane Keeping Assist with Lane Detection
"visualize in unreal engine? Is it possible to make "
Lane Keeping Assist with Lane Detection
"visualize in unreal engine? lane keeping matlab MATLAB Answers — New Questions
Human body model contact simulation
Hello,
I would like to simulate a robot arm that comes into contact with a human during its movement.
Is there a human model for Simulink Multibody where I can display the contact forces and accelerations at the contact points?
Thank you for your help.Hello,
I would like to simulate a robot arm that comes into contact with a human during its movement.
Is there a human model for Simulink Multibody where I can display the contact forces and accelerations at the contact points?
Thank you for your help. Hello,
I would like to simulate a robot arm that comes into contact with a human during its movement.
Is there a human model for Simulink Multibody where I can display the contact forces and accelerations at the contact points?
Thank you for your help. human body MATLAB Answers — New Questions
Why do I see different measured values for frequency of the same three phase electrical signal while using different PLL & PMU block types?
Hi Community,
I have modelled a grid using a programmable three phase AC voltage source and there are three loads attached to it. Model & Parameter file is attached. The loads 2 and 3 are switched off at T = 2 secs and switched back on at T = 4 secs.
I want to measure the frequency deviation in the 3-ph electrical voltage (magnitude, direction and time duration of instability) during sudden load shedding & load reconnection.
For this I used PLL blocks. Now, Simulink offers a few options for PLL & PLL based PMU blocks and my issue is that each of these blocks gives me a different result for the exact same scenario. I want to know how much frequency deviation is happening, but with each block giving me varying results, how do I conclude which result is accurate?
Frequency Meausurement Outputs
Types of PLL & PMU blocks used
Method 1: Sinusoidal Measurement (PLL, Three-Phase)
Method 2: PLL (3ph)
Method 3: Phasor Measurement Unit (PMU, Three-Phase)
Method 4: PMU (PLL-Based, Positive-Sequence)
Main Model
My base assumption is – frequency deviation in voltage is inherent attribute of the voltage. No matter the measuring mechanism, a frequency of 50 Hz should be measured as 50 Hz +- tolerance.
The same conceptual doubt also extends to the gains of the PLL block. Modifying the gain will affect one or more of frequency deviation characteristics (magnitude, direction and time duration of instability). So how do I narrow down on what gain values would be appropriate?Hi Community,
I have modelled a grid using a programmable three phase AC voltage source and there are three loads attached to it. Model & Parameter file is attached. The loads 2 and 3 are switched off at T = 2 secs and switched back on at T = 4 secs.
I want to measure the frequency deviation in the 3-ph electrical voltage (magnitude, direction and time duration of instability) during sudden load shedding & load reconnection.
For this I used PLL blocks. Now, Simulink offers a few options for PLL & PLL based PMU blocks and my issue is that each of these blocks gives me a different result for the exact same scenario. I want to know how much frequency deviation is happening, but with each block giving me varying results, how do I conclude which result is accurate?
Frequency Meausurement Outputs
Types of PLL & PMU blocks used
Method 1: Sinusoidal Measurement (PLL, Three-Phase)
Method 2: PLL (3ph)
Method 3: Phasor Measurement Unit (PMU, Three-Phase)
Method 4: PMU (PLL-Based, Positive-Sequence)
Main Model
My base assumption is – frequency deviation in voltage is inherent attribute of the voltage. No matter the measuring mechanism, a frequency of 50 Hz should be measured as 50 Hz +- tolerance.
The same conceptual doubt also extends to the gains of the PLL block. Modifying the gain will affect one or more of frequency deviation characteristics (magnitude, direction and time duration of instability). So how do I narrow down on what gain values would be appropriate? Hi Community,
I have modelled a grid using a programmable three phase AC voltage source and there are three loads attached to it. Model & Parameter file is attached. The loads 2 and 3 are switched off at T = 2 secs and switched back on at T = 4 secs.
I want to measure the frequency deviation in the 3-ph electrical voltage (magnitude, direction and time duration of instability) during sudden load shedding & load reconnection.
For this I used PLL blocks. Now, Simulink offers a few options for PLL & PLL based PMU blocks and my issue is that each of these blocks gives me a different result for the exact same scenario. I want to know how much frequency deviation is happening, but with each block giving me varying results, how do I conclude which result is accurate?
Frequency Meausurement Outputs
Types of PLL & PMU blocks used
Method 1: Sinusoidal Measurement (PLL, Three-Phase)
Method 2: PLL (3ph)
Method 3: Phasor Measurement Unit (PMU, Three-Phase)
Method 4: PMU (PLL-Based, Positive-Sequence)
Main Model
My base assumption is – frequency deviation in voltage is inherent attribute of the voltage. No matter the measuring mechanism, a frequency of 50 Hz should be measured as 50 Hz +- tolerance.
The same conceptual doubt also extends to the gains of the PLL block. Modifying the gain will affect one or more of frequency deviation characteristics (magnitude, direction and time duration of instability). So how do I narrow down on what gain values would be appropriate? simulink, frequency measurement, pll, pmu, three phase electrical signals MATLAB Answers — New Questions
I calculated IdIq as an equation in the experimental data 3 phase current, but the value is weird.
I’m comparing the output of the IdIq map with the input of RPM and torque and IdIq in the experimental data. I calculated IdIq with the equation as shown in the capture picture in the 3 phase current, which is the dynamo experimental data. But the value level doesn’t match the map value. The value in the map is id -280,iq 89. The result of calculation is id 0,iq300. Is there something wrong with the equation below? I’ve selected all the D-axis and Q-axis in the ParkTransform library, but id iq only change the value.I’m comparing the output of the IdIq map with the input of RPM and torque and IdIq in the experimental data. I calculated IdIq with the equation as shown in the capture picture in the 3 phase current, which is the dynamo experimental data. But the value level doesn’t match the map value. The value in the map is id -280,iq 89. The result of calculation is id 0,iq300. Is there something wrong with the equation below? I’ve selected all the D-axis and Q-axis in the ParkTransform library, but id iq only change the value. I’m comparing the output of the IdIq map with the input of RPM and torque and IdIq in the experimental data. I calculated IdIq with the equation as shown in the capture picture in the 3 phase current, which is the dynamo experimental data. But the value level doesn’t match the map value. The value in the map is id -280,iq 89. The result of calculation is id 0,iq300. Is there something wrong with the equation below? I’ve selected all the D-axis and Q-axis in the ParkTransform library, but id iq only change the value. idiq calculation MATLAB Answers — New Questions
How to set unit properties for arrays in simulink?
I have 3×1 positionArray such as [latitude, longitude, altitude] and units are [rad,rad,m].
This array is in the input for simulink. Is there any way to define different units for array in simulink?
In the "Signal Attributes" section, i tried:
rad, rad, m
rad_rad_m
[rad,rad,m]
{rad,rad,m}
nothing works.
Unit specifications are explained in following link, but there is no information about array units.
https://www.mathworks.com/help/simulink/ug/units-in-simulink.htmlI have 3×1 positionArray such as [latitude, longitude, altitude] and units are [rad,rad,m].
This array is in the input for simulink. Is there any way to define different units for array in simulink?
In the "Signal Attributes" section, i tried:
rad, rad, m
rad_rad_m
[rad,rad,m]
{rad,rad,m}
nothing works.
Unit specifications are explained in following link, but there is no information about array units.
https://www.mathworks.com/help/simulink/ug/units-in-simulink.html I have 3×1 positionArray such as [latitude, longitude, altitude] and units are [rad,rad,m].
This array is in the input for simulink. Is there any way to define different units for array in simulink?
In the "Signal Attributes" section, i tried:
rad, rad, m
rad_rad_m
[rad,rad,m]
{rad,rad,m}
nothing works.
Unit specifications are explained in following link, but there is no information about array units.
https://www.mathworks.com/help/simulink/ug/units-in-simulink.html signal attributes, unit, array MATLAB Answers — New Questions
how to implement lifi communication in matlab?
how to implement lifi communication in matlab?how to implement lifi communication in matlab? how to implement lifi communication in matlab? lifi-matlab MATLAB Answers — New Questions
how to simulate lifi transmitter and reciever using simulink
i need to simulate lifi technology transmitter and reciever using matlab simulink….also need help to use led block in simulink….i have the led block that has terminals as anode and cathode…..need led block as having only input and output terminals as they are the final block of my transmitter section.i need to simulate lifi technology transmitter and reciever using matlab simulink….also need help to use led block in simulink….i have the led block that has terminals as anode and cathode…..need led block as having only input and output terminals as they are the final block of my transmitter section. i need to simulate lifi technology transmitter and reciever using matlab simulink….also need help to use led block in simulink….i have the led block that has terminals as anode and cathode…..need led block as having only input and output terminals as they are the final block of my transmitter section. lifi, simulink, led, visible light communication, transmitter, reciever, simulation MATLAB Answers — New Questions
ODBC interface for changing login way
Hi, is there a way before I pack a GUI to an exe file to make an interface for later changing the connection ODBC to SQL server after that in case that server IP is changed meanwhile? Or I must to recode the source code and pack again? Thanks! R2015aHi, is there a way before I pack a GUI to an exe file to make an interface for later changing the connection ODBC to SQL server after that in case that server IP is changed meanwhile? Or I must to recode the source code and pack again? Thanks! R2015a Hi, is there a way before I pack a GUI to an exe file to make an interface for later changing the connection ODBC to SQL server after that in case that server IP is changed meanwhile? Or I must to recode the source code and pack again? Thanks! R2015a sql, connection, interface MATLAB Answers — New Questions
how can i fix this export error in Roadrunner?
1 month ago, I already export this data in RoadRunner.
and today I tried to export same data. but it was not working.
So how can I fix this error?1 month ago, I already export this data in RoadRunner.
and today I tried to export same data. but it was not working.
So how can I fix this error? 1 month ago, I already export this data in RoadRunner.
and today I tried to export same data. but it was not working.
So how can I fix this error? export, roadrunner MATLAB Answers — New Questions
How to highlight a area in figure
I want to hightlight the defect in croppedImage.mat by convHull.mat.
It’s better set transparent.
the size of two figures is same.I want to hightlight the defect in croppedImage.mat by convHull.mat.
It’s better set transparent.
the size of two figures is same. I want to hightlight the defect in croppedImage.mat by convHull.mat.
It’s better set transparent.
the size of two figures is same. highlight area MATLAB Answers — New Questions
Apply ‘rotatefactors’ on the observations to represent them in the new factorial design (PCA)
Hi all,
I guess, that it is an easy issue, but I can not figure out how to apply rotatefactors on the SCORES matrix resulting from a previous PCA:
(1) I run a PCA following:
[wcoeff,score] = pca(zscore(DataSet))
(2) I would like to rotate my principal components using rotatefactors:
[NewCoeff,TransfMatrix] = rotatefactors(wcoeff);
NewCoeff should give the new coordinates of the variables on the varimax-rotated components.
My question is: How can I compute the coordinates ‘NewScores’ of my observations on the new components? My idea is to plot them on a biplot and on an other scatter-plot where each axis is a component.
I guess that there is something easy like:
NewScores = score * TransfMatrix
Am I right?
RomainHi all,
I guess, that it is an easy issue, but I can not figure out how to apply rotatefactors on the SCORES matrix resulting from a previous PCA:
(1) I run a PCA following:
[wcoeff,score] = pca(zscore(DataSet))
(2) I would like to rotate my principal components using rotatefactors:
[NewCoeff,TransfMatrix] = rotatefactors(wcoeff);
NewCoeff should give the new coordinates of the variables on the varimax-rotated components.
My question is: How can I compute the coordinates ‘NewScores’ of my observations on the new components? My idea is to plot them on a biplot and on an other scatter-plot where each axis is a component.
I guess that there is something easy like:
NewScores = score * TransfMatrix
Am I right?
Romain Hi all,
I guess, that it is an easy issue, but I can not figure out how to apply rotatefactors on the SCORES matrix resulting from a previous PCA:
(1) I run a PCA following:
[wcoeff,score] = pca(zscore(DataSet))
(2) I would like to rotate my principal components using rotatefactors:
[NewCoeff,TransfMatrix] = rotatefactors(wcoeff);
NewCoeff should give the new coordinates of the variables on the varimax-rotated components.
My question is: How can I compute the coordinates ‘NewScores’ of my observations on the new components? My idea is to plot them on a biplot and on an other scatter-plot where each axis is a component.
I guess that there is something easy like:
NewScores = score * TransfMatrix
Am I right?
Romain pca, rotatefactors, scores MATLAB Answers — New Questions
Minimize the results in regression model
In my regression model I have four(04) input varibales (Al2O3, TiO2, Pressure, Speed) and there are one responce (Surface roughness(Ra)), So I don’t have idea how find optimum vales for four control factors to minimze the Surface roughness.
To develop this model I have done 16 experiments and the predicted values are shon below
Ra
0.064
0.039
0.071
0.238
3.256
3.910
2.786
0.037
3.604
0.043
0.037
0.060
0.049
0.023
0.061
1.113
Developed Regession Model
Ra = 28.66 + 50.01 Al2O3 + 35.80 TiO2 – 6.925 Pressure – 0.4221 Speed – 182.6 Al2O3*Al2O3 – 3.741 TiO2*TiO2 + 0.7566 Pressure*Pressure + 0.001753 Speed*Speed + 8.210 Al2O3*TiO2 – 2.541 Al2O3*Pressure – 0.04987 Al2O3*Speed – 3.373 TiO2*Pressure – 0.2407 TiO2*Speed + 0.03294 Pressure*Speed + 179.8 Al2O3*Al2O3*Al2O3
Can anyone help me to develop the Maltlab code to solve this problem ? thanks for your valuble time spend on thisIn my regression model I have four(04) input varibales (Al2O3, TiO2, Pressure, Speed) and there are one responce (Surface roughness(Ra)), So I don’t have idea how find optimum vales for four control factors to minimze the Surface roughness.
To develop this model I have done 16 experiments and the predicted values are shon below
Ra
0.064
0.039
0.071
0.238
3.256
3.910
2.786
0.037
3.604
0.043
0.037
0.060
0.049
0.023
0.061
1.113
Developed Regession Model
Ra = 28.66 + 50.01 Al2O3 + 35.80 TiO2 – 6.925 Pressure – 0.4221 Speed – 182.6 Al2O3*Al2O3 – 3.741 TiO2*TiO2 + 0.7566 Pressure*Pressure + 0.001753 Speed*Speed + 8.210 Al2O3*TiO2 – 2.541 Al2O3*Pressure – 0.04987 Al2O3*Speed – 3.373 TiO2*Pressure – 0.2407 TiO2*Speed + 0.03294 Pressure*Speed + 179.8 Al2O3*Al2O3*Al2O3
Can anyone help me to develop the Maltlab code to solve this problem ? thanks for your valuble time spend on this In my regression model I have four(04) input varibales (Al2O3, TiO2, Pressure, Speed) and there are one responce (Surface roughness(Ra)), So I don’t have idea how find optimum vales for four control factors to minimze the Surface roughness.
To develop this model I have done 16 experiments and the predicted values are shon below
Ra
0.064
0.039
0.071
0.238
3.256
3.910
2.786
0.037
3.604
0.043
0.037
0.060
0.049
0.023
0.061
1.113
Developed Regession Model
Ra = 28.66 + 50.01 Al2O3 + 35.80 TiO2 – 6.925 Pressure – 0.4221 Speed – 182.6 Al2O3*Al2O3 – 3.741 TiO2*TiO2 + 0.7566 Pressure*Pressure + 0.001753 Speed*Speed + 8.210 Al2O3*TiO2 – 2.541 Al2O3*Pressure – 0.04987 Al2O3*Speed – 3.373 TiO2*Pressure – 0.2407 TiO2*Speed + 0.03294 Pressure*Speed + 179.8 Al2O3*Al2O3*Al2O3
Can anyone help me to develop the Maltlab code to solve this problem ? thanks for your valuble time spend on this fmincon, optimization MATLAB Answers — New Questions
Single Patch antenna design (not using antenna tool box)
I want to design a single patch antenna (rectangle) and I want to output the beam pattern, S11, as a graph. Is there an expert who can make it S-band resonant frequency 3GHz??
For your information, I can’t use an antenna toolI want to design a single patch antenna (rectangle) and I want to output the beam pattern, S11, as a graph. Is there an expert who can make it S-band resonant frequency 3GHz??
For your information, I can’t use an antenna tool I want to design a single patch antenna (rectangle) and I want to output the beam pattern, S11, as a graph. Is there an expert who can make it S-band resonant frequency 3GHz??
For your information, I can’t use an antenna tool antenna, patch antenna MATLAB Answers — New Questions
Volume of irregular shape
I have for example X,Y,Z coordinates of 8 points which form an irregular shape. How can I calculate the volume with in this shape? Eg. coordinates area:
0 0 384,67
0 26,6 385,25
-47,85 26,6 385,9
-47,85 0 385,3
0 0 387,32
0 26,6 387,32
-47,85 26,6 387,32
-47,85 0 387,32I have for example X,Y,Z coordinates of 8 points which form an irregular shape. How can I calculate the volume with in this shape? Eg. coordinates area:
0 0 384,67
0 26,6 385,25
-47,85 26,6 385,9
-47,85 0 385,3
0 0 387,32
0 26,6 387,32
-47,85 26,6 387,32
-47,85 0 387,32 I have for example X,Y,Z coordinates of 8 points which form an irregular shape. How can I calculate the volume with in this shape? Eg. coordinates area:
0 0 384,67
0 26,6 385,25
-47,85 26,6 385,9
-47,85 0 385,3
0 0 387,32
0 26,6 387,32
-47,85 26,6 387,32
-47,85 0 387,32 voleme, convexhul MATLAB Answers — New Questions
Area of the hysteresis loops
Hi Community,
I have a stress vs. strain plot with approximately 30 different loops, and I need to calculate the area enclosed by each loop. I’ve attached a file containing the stress vs. strain data.
Any help or guidance would be greatly appreciated!
Thank you!Hi Community,
I have a stress vs. strain plot with approximately 30 different loops, and I need to calculate the area enclosed by each loop. I’ve attached a file containing the stress vs. strain data.
Any help or guidance would be greatly appreciated!
Thank you! Hi Community,
I have a stress vs. strain plot with approximately 30 different loops, and I need to calculate the area enclosed by each loop. I’ve attached a file containing the stress vs. strain data.
Any help or guidance would be greatly appreciated!
Thank you! matlab MATLAB Answers — New Questions
Can I implement a reflection wave behavior of a microstrip line in Simulink
Hi,I found a microstrip model in the RF Blockset section, but when I placed it in the circuit and ran the simulation, the oscilloscope did not capture any reflection waves(like ADS). Is it because I didn’t set it up correctly, or is this system just unable to simulate reflection waves?Thanks!Hi,I found a microstrip model in the RF Blockset section, but when I placed it in the circuit and ran the simulation, the oscilloscope did not capture any reflection waves(like ADS). Is it because I didn’t set it up correctly, or is this system just unable to simulate reflection waves?Thanks! Hi,I found a microstrip model in the RF Blockset section, but when I placed it in the circuit and ran the simulation, the oscilloscope did not capture any reflection waves(like ADS). Is it because I didn’t set it up correctly, or is this system just unable to simulate reflection waves?Thanks! microstrip line, reflection MATLAB Answers — New Questions
Even after following MISRA Guidelines and Model adviser ran with zero errors POLYSPACE is throwing MISRA C 2012 violations
Post Content Post Content misra c 2012 violation MATLAB Answers — New Questions
How to remove ‘zeros 0’ from histogram so it will not affect imhistmatchn?
Due to the mask, the histogram contains zeros, which is incorrect. How can I remove the zeros from the histogram, or how can I adjust the histogram function to exclude the zeros? This would ensure that the result will not affect the result of the imhistmatch function.
Thank you.Due to the mask, the histogram contains zeros, which is incorrect. How can I remove the zeros from the histogram, or how can I adjust the histogram function to exclude the zeros? This would ensure that the result will not affect the result of the imhistmatch function.
Thank you. Due to the mask, the histogram contains zeros, which is incorrect. How can I remove the zeros from the histogram, or how can I adjust the histogram function to exclude the zeros? This would ensure that the result will not affect the result of the imhistmatch function.
Thank you. histogram, imhistmatchn, matlab, zeros MATLAB Answers — New Questions
Why parameterized MOSFETs does not show response
Hey,
I have an EV model where velocity is controlled via PMSM FOC blockset and when using ideal converter, the model is correctly following the reference speed and generating torque as expected and even when I put MOSFET (Ideal Switching), the model response is as expected, however, when I parameterized the same MOSFETs using preparameterized MOSFET or even I do the parameterizaton on my own using N-Channel MOSFET using datasheet, the response is 0.
I have done the tuning via trial and error and even tried to change the gains to see even some response.
I am attaching the Model here, any expert in this modelling can have look and guide on the issue.Hey,
I have an EV model where velocity is controlled via PMSM FOC blockset and when using ideal converter, the model is correctly following the reference speed and generating torque as expected and even when I put MOSFET (Ideal Switching), the model response is as expected, however, when I parameterized the same MOSFETs using preparameterized MOSFET or even I do the parameterizaton on my own using N-Channel MOSFET using datasheet, the response is 0.
I have done the tuning via trial and error and even tried to change the gains to see even some response.
I am attaching the Model here, any expert in this modelling can have look and guide on the issue. Hey,
I have an EV model where velocity is controlled via PMSM FOC blockset and when using ideal converter, the model is correctly following the reference speed and generating torque as expected and even when I put MOSFET (Ideal Switching), the model response is as expected, however, when I parameterized the same MOSFETs using preparameterized MOSFET or even I do the parameterizaton on my own using N-Channel MOSFET using datasheet, the response is 0.
I have done the tuning via trial and error and even tried to change the gains to see even some response.
I am attaching the Model here, any expert in this modelling can have look and guide on the issue. simscape, power_electronics_control MATLAB Answers — New Questions
Ideas on generalizing the syntax used for constructing complex variables
I am looking for ideas on how to construct a class that generalizes the interface Matlab uses for creating and manipulating complex variables. The general idea is that one could construct a "pets" object by simplying typing:
mypets = 2dogs + 3cats
which would create an object of the pets class.
I can think of a few clunky ways to do this, such as having the constructor parse a string like this:
mypets = pets(‘2dogs + 3cats’).
Another slightly nicer way would be to leave out the parenthesis like this:
pets 2dogs + 3cats
but this still requires an explicit constructor reference. Any ideas anyone?I am looking for ideas on how to construct a class that generalizes the interface Matlab uses for creating and manipulating complex variables. The general idea is that one could construct a "pets" object by simplying typing:
mypets = 2dogs + 3cats
which would create an object of the pets class.
I can think of a few clunky ways to do this, such as having the constructor parse a string like this:
mypets = pets(‘2dogs + 3cats’).
Another slightly nicer way would be to leave out the parenthesis like this:
pets 2dogs + 3cats
but this still requires an explicit constructor reference. Any ideas anyone? I am looking for ideas on how to construct a class that generalizes the interface Matlab uses for creating and manipulating complex variables. The general idea is that one could construct a "pets" object by simplying typing:
mypets = 2dogs + 3cats
which would create an object of the pets class.
I can think of a few clunky ways to do this, such as having the constructor parse a string like this:
mypets = pets(‘2dogs + 3cats’).
Another slightly nicer way would be to leave out the parenthesis like this:
pets 2dogs + 3cats
but this still requires an explicit constructor reference. Any ideas anyone? generalize complex MATLAB Answers — New Questions