Open Abraxas3d opened 3 days ago
Tried effective resolution of 24 bits next:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 100 (or more) buckets of bits on the bus. (1) Total PRBS_BIT_COUNT: (0x0011e614@0050) (1) Total PRBS_ERROR_COUNT: (0x0008f230@0054) (1) 50.0 -32438223 -110673764 0x18001298 0x180000c0 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kp = 2.8374e-04 P-gain = 2.8374e-04 * 2^32 = 1218654 decimal = 0x12985E
For Ki = 1.1468e-05 I-gain = 1.1468e-05 * 2^32 = 49254 dec = 0xC067
For both P and I gains, the divisor/right-shift should be set to 32.
100 (or more) buckets of bits on the bus. (1) Total PRBS_BIT_COUNT: (0x001208a5@0050) (1) Total PRBS_ERROR_COUNT: (0x0009030c@0054) (1) 50.0 -30929385 -104185517 0x2012985e 0x2000c067
will send file to The Paul for processing in a bit! :grin:
Attempting to represent newly calculated Kp and Ki: Kp = 2.8374e-04 Ki = 1.1468e-05
msk_top_regs.h
msk_rx_init.c
)Using the higher resolution registers described in https://github.com/OpenResearchInstitute/pluto_msk/blob/main/rdl/msk_top_regs.md
Third line below is percent error, F1 accumulator, F2 accumulator, proportional config register, integral config register
Getting 50% error with no successes at all yet, but suspect I'm not representing the numbers correctly yet.
For example, we take Kp and divide by (1/2^32) and get how many times our calculated Kp can be divided by the resolution of the representation (in this case, 32 bit resolution). This scaled number is rounded and then converted to hex for display. We use the hex number in the gain multiplier field and 32 in the gain divisor field.
This should divide the hex value by (1/2^32).
Someone check to make sure I am representing the numbers correctly? :thinking: