represents the symbolic surrogate model obtained from SystemModelSurrogateTrain.
SystemModelSurrogate
represents the symbolic surrogate model obtained from SystemModelSurrogateTrain.
Details
- SystemModelSurrogate is generated by the function SystemModelSurrogateTrain and provides ways of exploring, diagnosing and extracting training results.
- A SystemModelSurrogate[…] object sms can be used to retrieve properties through sms["property"].
- sms["Properties"] gives a list of available properties. Additional details about the properties are listed on the page for SystemModelSurrogateTrain.
- Typical properties include:
-
"Net" surrogate model as a neural net "ParametricFunction" surrogate model as a parametric function "SystemModel" surrogate model as a system model - Use sms[{p1,…}] to get the values of properties pi.
Examples
open all close allBasic Examples (1)
surrogate = SystemModelSurrogateTrain[AffineStateSpaceModel[{{Cos[x2], (-a)*x2 + Cos[x1^2]}, {{0}, {1}}, {x2}, {{0}}}, {x1, x2}], <|"Outputs" -> x2, "ParameterValues" -> {a -> CenteredInterval[0.2, 0.1]}|>]Extract the parametric function:
surrogate["ParametricFunction"]Retrieve a list of properties:
surrogate[{"Net", "RRMSEPlot"}]Scope (1)
Properties (1)
Find the list of available properties:
model = NonlinearStateSpaceModel[{{u - x1 x2, u x2 + a Cos[x1]}, {x1}}, {x1, x2}, u]spec = <|"Outputs" -> x1, "ParameterValues" -> {a -> Around[0.5, 0.1]}, "Inputs" -> {u -> Cos}|>;surrogate = SystemModelSurrogateTrain[model, spec]surrogate["Properties"]Extract the parametric function:
fun = surrogate["ParametricFunction"]surrogate["Net"]Create a SystemModel from the surrogate with a given model name:
sm = surrogate["SystemModel", "SurrogateModelName" -> "MySurrogate", GeneratedAssetLocation -> $TemporaryDirectory]Extract validation information like the maximum absolute error plot:
surrogate["MAEPlot"]Extract the root mean squared error plot:
surrogate["RMSEPlot"]Extract the relative root mean squared error plot:
surrogate["RRMSEPlot"]Compare the surrogate with the original model for a specific value of the parameter:
Show[SystemModelPlot[model, x1, <|"ParameterValues" -> {a -> 0.5}, "Inputs" -> {u -> Cos}|>], ListLinePlot[fun[0.5], PlotStyle -> Directive[StandardRed, Dashed], PlotRange -> All], PlotRange -> All]Applications (1)
Start with a model for battery discharging:
model = \!\(\*GraphicsBox[«8»]\);Estimate the voltage in a battery for a specific range of the open circuit voltage at maximum state of charge:
simulation = <|"Outputs" -> "battery1.v", "SimulationInterval" -> 300, "SimulationCount" -> 50|>;uncertainty = <|"ParameterValues" -> {"cellData1.OCVmax" -> Interval[{5, 10}]}|>;surrogate = SystemModelSurrogateTrain[model, Join[uncertainty, simulation]]Compare the surrogate with the original model for a specific value of the open circuit voltage:
Show[SystemModelPlot[model, "battery1.v", 300, <|"ParameterValues" -> {"cellData1.OCVmax" -> 7.5}|>], SystemModelPlot[surrogate, "battery1.v", 300, <|"ParameterValues" -> {"cellData1.OCVmax" -> 7.5}|>, PlotStyle -> StandardRed], PlotRange -> All]net = surrogate["Net"]Deploy a Manipulate that plots the net for various values of the parameter:
CloudDeploy[Manipulate[ListLinePlot[net[{v}, WorkingPrecision -> "Real64"], PlotRange -> All], {{v, 7.5}, 5, 10}], Permissions -> "Public"]Tech Notes
Related Guides
Related Links
History
Text
Wolfram Research (2026), SystemModelSurrogate, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemModelSurrogate.html.
CMS
Wolfram Language. 2026. "SystemModelSurrogate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SystemModelSurrogate.html.
APA
Wolfram Language. (2026). SystemModelSurrogate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemModelSurrogate.html
BibTeX
@misc{reference.wolfram_2026_systemmodelsurrogate, author="Wolfram Research", title="{SystemModelSurrogate}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/SystemModelSurrogate.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_systemmodelsurrogate, organization={Wolfram Research}, title={SystemModelSurrogate}, year={2026}, url={https://reference.wolfram.com/language/ref/SystemModelSurrogate.html}, note=[Accessed: 12-June-2026]}