Hello Everyone!
I try to run the autopilot MP2128HeliG2 in trueHWIL setup. After load a simulation to the xPC Target computer I run the Autopilot and I got a lots of errors from sensors. The message gathered from Terminal is:
[1B][2J[1B][0;0HFATAL ERRORS:
Watchdog CRC Mismatch[1B][K
x accl failed [1B][K
Accl Temperatures Failed[1B][K
GPS config error[1B][K
Compass is enabled but is not installed.[1B][K
[1B][K
WARNINGS:
Autopilot loaded with non-release code.[1B][K
[1B][K
Lockd 11.3V 0.0V
spd= 17
z acc=854
compass hdg=0 0 0 0
I tried to run the calibration trueHwil Control Centre program to calibrate sensors. When I load the callibration_2128.thprj file and tried to load it to run the simulation I got the error of different numbers of parameters between downloaded model to target PC and parameter file. In result I cannot load the model to xPC Target computer to run the calibration. In xPC Target I have this message:
Download started...
Download finished
Mismatch between model and kernel versions
Is the calibration proces necessary for those Horizon fatal errors? If Yes then how I can solve the problem with calibration program problem?
Thanks for any advices
Regards
Janusz
Replies
Hi Kevin,
After self tests it's look like the ST2 is the same. The ST1 rise only four times. And the Pitch gyro signal only rise three times. You can see the exact shapes in the attached bitmaps.
The J44 plug we have from fixed wing setup so there wasn't pin 3 in the plug. So probably i could bypass it with external wire directly from Servo5, up to Pin S3 inside a Digital Box and with the Jumper connect it with AD3. Is this apprach will be enough to run multirotor simulation correctly? Because this missing connection didn't influence pitch gyro error, so maybe for now we don't have to correct it.
Best regards,
Janusz
J21.3_ST2.bmp
J21.5_ST1.bmp
J34.2_pitch_gyro.bmp
Hi Janusz,
I don't know why your ST1 only rises four times and your pitch gyro signal rises three times while mine rose one time and fell 6 times. I will investigate this further when I have time.
"The J44 plug we have from fixed wing setup so there wasn't pin 3 in the plug. So probably i could bypass it with external wire directly from Servo5, up to Pin S3 inside a Digital Box and with the Jumper connect it with AD3. "
Yes, this is what you must do.
"Is this apprach will be enough to run multirotor simulation correctly?"
I thought you were trying to run a helicopter simulation. The helicopter simulation requires servos 1-5. For multirotor simulations, it depends on how many rotors are configured in the VRS. You can have 4 rotors, 6 rotors or 8 rotors. For example, for a quadrotor (4 rotors), when the VRS Heli tab heli mode = quadrotor A, the servos tab says servo 1 = Front right rotor, servo 2 = back right rotor, servo 3 = back left rotor, servo 4,5,6 unused. Servo 7 = front left rotor and servo 8 unused. So you'd need have connections from the servo board S1, S2, S3, S7 to the digital box in order to run a quadrotor simulation.
"Because this missing connection didn't influence pitch gyro error, so maybe for now we don't have to correct it. "
Again, the servo connections have nothing to do with the pitch gyro failing the self test.
Hello Kevin,
Signals on the pins were like this:
GPS Tx is J34 pin 6 (orange wire) - constantly was 3.3V, after start of autopilot, and also after few minutes later.
GPS Rx is J34.8 (purple wire) - constantly was 3.3V, after start of autopilot, and also after few minutes later.
GPS PPS (pulse per second) is J21 pin 2 (red wire) - It was puls every second and it takes 100ms.
And I sent the log report with modification of vrs file. after last line there wasn't any changes during last 4 minutes of the test.
Regards
Janusz
2023_11_24_GPS_log.txt
Hi Janusz,
Great! Let's focus on the AGL fatal error now. After performing the standard startup procedure and connecting in Horizon, open sensor monitor and add field 1089. This is the raw AGL reading in the units of ft*36.5. Let me know what the value is.
Hi Janusz,
Your results show that no GPS messages are being sent to the sensorless autopilot. Did you have the model loaded, simulation running and analog and digital boxes powered on? If not, please do that and re-test.
Hi Janusz,
Those voltage levels are acceptable.
Hello Kevin,
It's good news. So we can assume that the Analog Acquisition Board, Analog Interface and NI PCI-6703 generate proper voltages, at least on this chanel. Can we check other elements of TrueHWIL system in similar way? Or have you some other propositions what we could check to push the calibration properly?
Regards,
Janusz
Hi Janusz,
Your test procedure looks correct. But was the SPI board powered on? If not, it should be, try again. If it was I'm not sure what the issue could be. Our THWIL expert is unfortunately on vacation this week. I'll follow up with him when he is back.
And also was the Digital box powered on? It should be. If not, try again.
The calibration process finished without any result. Every one of 100 iterations looked the same:
Setting pitch rate to 0: 0
Setting pitch rate to 90: 0
Setting pitch rate to -90: 0
Reading parameter Pitch_Gain: 1.00
Reading parameter Pitch_Offset: 1.00
calc_pitch_rate_scale: 1.#J calc_gyro_0: 1.#R
Writing Pitch_Gain and Pitch_Offset to xPC
Completed 100 iterations but the values still haven't converged. Pitch Rate Gyro 0: 0 -90: 0 +90: 0
Calibration Complete! :)
I opened the parameters list from the model and the parameter 884 Pitch_Gain is equal 0.415946, parameter 885 Pitch_Offset is equal 4.179527. When I uploaded them from xPC Target those parameters had the same values. So its weerd that during calibration process program reads those parameters as 1.00 every time.
I unpluged all wires and pluged them again, also checked the connections many times, and i don't see any differences with MicroPilot trueHWIL Simulator Connector Diagram. I didn't plug the external GPS antena because those signals we should get from model. I also switched places of RS232 cables to check if one of them could be damaged, but still i have the same errors as previously.
Regards and thanks for Your involvement in our couse.
Janusz