Prev: Error: The expression to the left of the equals sign is not a valid target for an assignment.
Next: homework
From: Robert on 3 Mar 2010 12:52 Hello, I am using Simulink to model a spacecraft time synchronization system. I am trying to simulate a system with two independent clocks. One clock, the ground system clock, will have a peridod of 1/(10^6). The other clock, the spacecraft clock, will have a period of 1.0001/(10^6). I am trying to model drift in the spacecraft clock. The time synchronization system is designed to correct for both phase and drift error. I am getting the following errors: Model Error "Invalid setting for fixed-step size (5.0005e-007) in model 'DriftError_Sim'. All sample times in your model must be an integer multiple of the fixed-step size" Block Error "The Sample time period (5e-007) of 'DriftError_Sim/1 MHz Clock1/Unit Delay' is not an integer multiple of the fixed step size (5.005e-007) specified for model." I am not sure how to adjust the sample time period in the default Simulink clock model block. Is there any way around this problem? Any suggestions?
From: Will Campbell on 3 Mar 2010 15:09
Hi Robert, A Unit Delay block is a method of retrieving a previous value of a signal. Typically, the user wants the previous time step's value, and the sample time is defined as -1. You can alter the sample time to an integer multiple of the model's step size, i.e. request that you only perform this operation every 3 time steps. In your case, that means that you can only specify integer multiples of 5.005E-7. I'm not sure what your using the Unit Delay block for in this particular application, so I can't provide much more specific guidance on this error. My suspicion is that your model step size is incorrect for the task. In order to capture the small offset in your clocks, you will likely have to reduce the step size to whatever the common denominator for your clocks are. For instance, if you have two processes running at 10 Hz and 11 Hz, a fixed step solver will have to be run at 1/10 - 1/11. In your case, you're looking at 1E-10. You might consider using a unit of time other than seconds at that point. Microseconds might be a better call. Another approach would be to use a variable step solver or to let Simulink automatically determine the fixed step size. Cheers, -Will > Hello, > I am using Simulink to model a spacecraft time synchronization system. I > am trying to simulate a system with two independent clocks. One clock, the > ground system clock, will have a peridod of 1/(10^6). The other clock, the > spacecraft clock, will have a period of 1.0001/(10^6). I am trying to > model drift in the spacecraft clock. The time synchronization system is > designed to correct for both phase and drift error. I am getting the > following errors: > > Model Error > "Invalid setting for fixed-step size (5.0005e-007) in model > 'DriftError_Sim'. All sample times in your model must be an integer > multiple of the fixed-step size" > > Block Error > "The Sample time period (5e-007) of 'DriftError_Sim/1 MHz Clock1/Unit > Delay' is not an integer multiple of the fixed step size (5.005e-007) > specified for model." > > > I am not sure how to adjust the sample time period in the default Simulink > clock model block. Is there any way around this problem? Any suggestions? |