For three years now, Congress has been in the business of producing its own formal budget. And each year, the House leadership has struggled with the delicate ideological formula that will provide enough liberal and conservative votes to insure passage.

It took two tries on the House floor last spring. Liberals felt social programs had been shortchanged in favor of defense, and conservatives balked at the projected deficit.

A final House-Senate budget resolution was passed just in time to meet the May 15 deadline, after a protracted conference between the two bodies.

When the House and Senate budget committees sit down this week to draft their budget for fiscal 1979 (which begins Oct. 1), the difficulties they faced last year are liable to seem small by comparison.

The usual conflicts of the last few years have been sharpened by current economic uncertainties about inflation and rising interest rates.

Add to that the irreconcilable pressures for increased expenditures and a smaller deficit in an election year, and 1978's budget fight may be remembered as a very genteel affair.

If the politics of the deficit were not enough to shake the troubled budget process, the budget is also likely to become a lightning rod for the first serious floor debate on what direction Congress should take on income tax cuts and Social Security tax rollbacks.

In deciding how to raise revenues to finance spending in 1979, legislators will have to make explicit or implicit decisions about how big a tax cut there should be in 1979 (Carter has asked for a net $24.5 billion cut), how much the president should get of th $9 billion in tax reform he requested, whether to trim some of the billions of dollars of Social Security tax increases Congress voted into effect last year, and whether to grant tax credits for higher education or adopt the president's plan for sharply increasing aid to college students.

It will be hard for Congress, especially in the House, to resist cutting taxes more than either the president or the leadershop wants, which will pump up the deficit further. And although House Republicans surely will back large tax cuts both in Social Security and income areas, they are likely to continue to vote against the overall budget because of its large deficit.

As in the past, that often forces the Democratic leadership to move to the left to put together a coalition, a move that is not always successful and that threatens to make compromise with a more conservative Senate more difficult.

Last January, President Carter proposed a 1979 budget of $500.2 billion, a taxing and spending agenda he described as "lean," although it contains a deficit of $60 billion, a hugh difference between revenues and outlays for the fourth year of an economic recovery. Under the budget process adopted in 1975, Congress uses the president's plan as a reference point, but formally devises its own schedule of outlays and revenues and, therefore, the size of the deficit it can live with.

The process is designed to make Congress deal with overall federal spending rather than with each spending bill in isolation. If a spending bill would exceed the ceiling established by the congressional budget (adopted in advisory form in May and in binding form in September), the legislature is supposed to either cut spending elsewher or direct the tax-writing committees to raise revenues.

However, many observers say, the budget committees have done little to force restraint on any particular program. They say, for example, that spending in the recent farm legislation will exceed the ceiling, but Congress does not worry. Others counter that the process is not supposed to be a rigid fix on congressional spending prerogatives but serves its function if it allows Congress to vote knowing the full impact of its actions.

Rep. Robert N. Giaimo (D-Conn.), in his second year as chairman of the House Budget Committee, is expected to propose a budget with a spending level slightly higher than Carter's but with a smaller deficit. Giaimo will argue for a $20 billion cut, not the $24.5 billion Carter asks for, and within that figure include a rollback of $7.5 billion of Social Security taxes.

The Giaimo budget keeps to Carter's spending level by making some assumptions the president is unwilling to make about the level of interest rates (hold down federal spending), how much the Pentagon will spend and what receipts the government will get from offshore oil sales.Giaimo takes these "savings" and distributes them to more traditional Democratic spending programs and to the farmers.Many observers are skeptical that all Giaimo's assumptions will work out as he says.

Furthermore, both the president and Giaimo assume some "legislative" savings (such as hospital cost containment) that are unlikely to be approved by Congress. If they are not, spending will be higher than estimated.

Sen. Edmund Muskie (D-Maine) does not formally propose his own budget, but Muskie and most other members of the Senate Budget Committee are said to be convinced that $60 billion is at the outer limits of what can be considered an acceptable deficit, especially this late in an economic recovery recovery when continued government deficits can be inflationary.

To a country that is awakening again to the dangers of high inflation, rising interest rates and the role the deficit plays in excerbating both, even the $60 billion deficit President Carter proposed may be a red flag.

Yet heavy spending pressures already threaten to boost that deficit substantially. Farm legislation that will be passed in the next few weeks is expected to add at least $4 billion to the president's proposed level for agriculture spending. And Giaimo's committee thinks the president underestimated by $2 billion how much the government will have to pay farmers under current law.

Veterans, small business disaster victims and the military are all groups with influential constituencies that threaten to push spending ever upwards, with few balancing forces willing to trim outlays for other areas.

And while spending pressures seem inexorable, the move to cut taxes more than the president or the House leadership wants seems equally heavy.

House Republicans, for example, are likely to cooperate with Giaimo's proposal to roll back Social Security tax increases by $7.5 billion.

But they'll also push for the full $24.5 billion of tax cuts the president wants and back the income tax credit for higher education. Giaimo wants to hold the entire tax cut to $20 billion, of which $7.5 billion would be the Social Security rollback.

Pressure to roll back the Social Security increases does not appear to be as strong in the Senate as in the House, but Sen. Russell B. Long (D-La.), chairman of the tax-writing Senate Finance Committee, already has told Muskie that he wants to cut tax rates enough to generate about $430 billion or less in fiscal 1979, not the $440 billion Carter wants.

In the words of one congressional aide, the budget process this year stands to be a "potboiler." However, another noted, the mood of the electorate may be more important this year than traditional allegiances. Legislators were home all last week, and if concerns about inflation and federal deficits are as strong as some polls indicate, a renewed ethic of spending restraint could prevail.

Yet, as George P. Shultz, a former Treasury secretary and former Office of Management and Budget director, used to observe, the budget is a battle of the sum and the parts, and the parts always win.

Giaimo and Muskie fought hard in the House and Senate last spring and again last month against sharp boosts in payments to farmers, warning that the bills threatened (they still do) to violate spending ceilings already adopted by Congress. Forewarned, Congress voted to spend billions anyway. And the spate of spending on the farmer may not be over yet.

However, some budget obeservers are heartened that a move by advocates of the Humphrey-Hawkins full employment bill to vest in the Joint Economic Committee the macroeconomic goal setting for Congress was defeated in the House overhelmingly. Congressional budget makers always have set forth the goals for employment, inflation and economic growth that the congressional taxing and spending agenda seeks to achieve.

But Title III of the Humphrey-Hawkins Bill was defeated by the House, a nod of approval to the budget process, many think. The fight was led not by Giaimo, who claimed that the JEC would not have been able to pre-empt budget committee rights anyway, but by a coalition of Democrats and Republicans, including minority leader John Rhodes (R-Ariz.).

Some observers think that, despite Republican rhetoric, the fight over Humphrey-Hawkins may be a reluctance to compromise on the House (Muskie has always been able to put forth a bipartisan effort in the Senate).

The start toward drafting the 1979 budget this week will tell whether the budget process will at last become a method by which Congress measures its priorities against its resources, or whether the congressional budget process is, as some charge, merely a sophisticated method for keeping track of spending.