throttle control PWM analogWrite

Hello. I need to control ebike throttle. It has 3 pin throttle (5V, GND, Signal) and controller.
When I connected throttle signal to arduino analog pin (and common ground) I can read correct values 0.8V - 4V according on throttle level.

float in = analogRead(0) * 4.65 / 1023.0;

But to modify throttle level I need to send it from arduino back to controller.
When I try to use arduino digital pin PWM (3, 6, 9, 11) motor just twitch and does not run.

pinMode(3, OUTPUT);
float out = in * (255.0 / 4.65);
analogWrite(3, (int) out);

I tried with constant values to avoid any mistakes and removed all code from sketch.

analogWrite(3, 200);

I tested arduino PWM output voltage by cheap multimeter (voltmeter) and it is showing correct voltage (+- 0.01V), but motor just twitch.
I am using Arduino Nano ATMEGA238P.

I also tried digitalWrite / delayMicroseconds but no success, motor just twitch once or every second for a very short moment.
Do I need RC Low Pass Filtering?

What I might be doing wrong? Thanks in advance.

Do I need RC Low Pass Filtering?

Yes, the analog output (PWM) is not analog. It is a pulse train with variable duty cycle. The DMM averages (low pass filters) the pulses so it looks analog, but it is not. The PWM is 0 or 5V not 0 to 5V.

Yes a CR filter may do the job .

Thanks for help. It acutally worked. PWM PIN - 10k resistor - 22uf capacitor - controller (common ground).
I probably need much less capacitor value like 100nf? I only had 22uf available for now.