Error compiling Simscape network for model
35 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Omar Yaseen
el 15 de Jun. de 2022
Comentada: David John
el 16 de Jun. de 2023
I am working on a energy engineering project & I have this error (Error compiling Simscape network for model PVh)
how can I solve it Please
Error compiling Simscape network for model PVh.
Caused by:
- ['PVh/Set Optimal Operating Point/PS Lookup Table (2D)']: Function, tablelookup, is wrong. Please check 1) whether input data points have correct sizes; 2) query values are row or column vectors and have identical sizes; 3) query values and table data have the commensurate units; and 4) constants or compile time parameters are passed to interpolation and extrapolation argument. In foundation.signal.lookup_tables.two_dimensional (line 40)
- Argument 1 = [1x10 double]
- Argument 2 = [1x10 double]
- Argument 3 = [10x10 double]
- Argument 4 = [1x1 double]
- Argument 5 = {[1x1 double], 'K'}
- x1 = [1x10 double]
- x2 = [1x10 double]
- f = [10x10 double]
- I1 = [1x1 double]
- I2 = {[1x1 double], 'K'}
- extrap_method = 1
- interp_method = 2
the code is
inputs
I1; % x1:left
I2; % x2:left
end
outputs
O; % f:right
end
parameters
x1 = [1 2 3 4 5]; % Table grid vector 1
x2 = [1 2 3 4 5]; % Table grid vector 2
f = [0 1 2 3 4; 1 2 3 4 5; 2 3 4 5 6; 3 4 5 6 7; 4 5 6 7 8]; % 2D array of table values
interp_method = simscape.enum.interpolation.linear; % Interpolation method
extrap_method = simscape.enum.extrapolation.linear; % Extrapolation method
end
parameters (Access=private)
x1_min = min(x1); % minimum value of Table grid vector 1
x1_max = max(x1); % maximum value of Table grid vector 1
x2_min = min(x2); % minimum value of Table grid vector 2
x2_max = max(x2); % maximum value of Table grid vector 2
end
equations
O == tablelookup(x1, x2, f, I1, I2, interpolation=interp_method, extrapolation=extrap_method);
if interp_method == simscape.enum.interpolation.linear
assert(length(x1) >= 2)
assert(length(x2) >= 2)
else
assert(length(x1) >= 3)
assert(length(x2) >= 3)
end
assert(all(size(f) == [length(x1), length(x2)]))
assert(all(diff(x1) > 0) || all(diff(x1) < 0))
assert(all(diff(x2) > 0) || all(diff(x2) < 0))
if extrap_method == simscape.enum.extrapolation.error
assert(all(I1(:) >= x1_min))
assert(all(I1(:) <= x1_max))
assert(all(I2(:) >= x2_min))
assert(all(I2(:) <= x2_max))
else
end
end
annotations
[x1, x2, f] : UnitDropdown = common
end
end
1 comentario
新杰 许
el 6 de Oct. de 2022
Error compiling Simscape network for model untitled1.
原因:
['untitled1/PS Lookup Table (1D)']: Function, tablelookup, is wrong. Please check 1) whether input data points have correct sizes; 2) query values are row or column vectors and have identical sizes; 3) query values and table data have the commensurate units; and 4) constants or compile time parameters are passed to interpolation and extrapolation argument. 在 foundation.signal.lookup_tables.one_dimensional (line 35) 中
Argument 1 = [1x101 double]
Argument 2 = [1x101 double]
Argument 3 = {[1x1 double], 'm'}
x = [1x101 double]
f = [1x101 double]
I = {[1x1 double], 'm'}
extrap_method = int32(2)
interp_method = int32(1)
组件:Simulink | 类别:Model 错误
I have set the unit. Here are models and some data. You can try. My MATLAB version is r2022a
Respuesta aceptada
David John
el 21 de Nov. de 2022
The units of "Table grid vector" in "PS Lookup Table (1D)" should be 'm' instead of '1'.
1 comentario
David John
el 21 de Nov. de 2022
I see that your screen shot has this, but perhaps you had not applied the change or something. If I make this one change to the model you supplied, it works for me.
Más respuestas (1)
Tejaswini
el 16 de Jun. de 2023
Hlo, I am doing an project on hydraulic tilt control system, and its showing error like this :
"Error compiling Simscape network for model Hydraulictiltactuationmodel1.
Caused by:
- Frequency and time mode requires at least one sinusoidal source to proceed. No such sources were found. "
How to solve this one?
please help
1 comentario
David John
el 16 de Jun. de 2023
Please note: you've added this as an answer to someone else's question. It would be better to create a new question. At any rate, in your model the sinusoidal sources are not within the Simscape network, they are coming from Simulink. I suggest either using PS Sine blocks in place of the Simulink Sine and Simulink-to-PS Converters, or using "Time" for the Equation Formulation in the Solver Configuration.
Ver también
Categorías
Más información sobre Troubleshooting en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!