Are these equations correct for the motion of a gyroscope?

I was coding a gyroscope simulation and came up with some equations that I used for it. So firstly,

torque = (change in angular momentum)/(change in time) = (vertical moment of inertia)(vertical angular acceleration) + (gyroscopic angular momentum)(perpendicular angular velocity)

Where vertical MoI = MoI about axis of falling and vertical AngAccel = AngAccel about axis of falling (so like, ignoring its precession) and gyroscopic AM is the AM of the spinning part of the gyroscope and perpendicular AngVel is the AngVel perpendicular to the falling AngVel (so in the direction of the cross product of gyroscopic AM and torque) and then

(Gyroscopic angular momentum)(vertical angular velocity) = (vertical moment of inertia)(perpendicular angular acceleration)

And so my thinking is that since perpendicular AngVel starts out at zero, it leads to the gyroscope accelerating in the falling direction. Then, in order to counteract the change in gyroscopic angular momentum (since it's changing direction in the falling direction), the gyroscope starts accelerating perpendicularly to the direction its falling, which then causes the vertical angular acceleration to decrease and eventually become negative and it sort of goes on like that correcting itself.

The problem is that when I coded it it didn't seem to behave very realistically, and I'm unsure if that's because my thinking is wrong or if a theoretically ideal gyroscope would behave in the way my code did but most just aren't? (I also could've messed up my code cause it's a bit messy but I'm just wondering if someone can tell me if what I said above is right).

And to explain my coded one it sort of would just dip catch and go back up and slow down and repeat (basically make a bunch of wide U's in a circle the number, rate, and size of which depended on some variables) whereas real ones sort of just go straight around in a circle for the most part.

Anyways thanks if anyone can help explain this for me!

In classroom demonstrations the gyroscope wheel is almost always released gingerly. By gingerly I mean the demonstrator doesn't remove support fast (allowing a sudden drop), instead the support is taken away slowly.

Another scenario is when the spin rate of the gyro wheel is very high. Then the frequency of the nutation is high, with corresponding small amplitude. So when the spin rate of the gyro wheel is very high then on release the nutation tends to go unnoticed, and the high frequency nutation dampens very rapidly anyway.

The behavior of the simulated object (in the simulation) that you describe is consistent with a motion pattern of gyroscopic precession combined with nutation.

Presumably in the simulation the gyro wheel is not released gingerly.

For comparison: check out the following article: It has to go down a little, in order to go around

The article describes a tabletop experiment: it shows the nutation that you describe.

For understanding the mechanics:
See my 2012 answer in which I discuss gyroscopic precession

(The explanation in that answer does not use the concept of angular momentum. Instead the explanation capitalizes on symmetry to organize the reasoning.)